public interface XfaFileheader
Modifier and Type | Method and Description |
---|---|
boolean |
flushHeader(java.nio.channels.FileChannel inoutChannel,
boolean setDate)
Writes the header to the native file.
|
int |
getDate(int whatDate)
Gets the date of the file from the header.
|
int |
getOffset()
This gets the offset from file position 0, as SMSQE thinks it is and the real fileposition 0 in the native filesystem.
|
java.lang.String |
getSMSQEFilename()
Gets the (SMSQE) filename from the header.
|
int |
getVersion()
Gets the version of the file from the header.
|
int |
readFileheader(MC68000Cpu cpu,
int position,
int bufflen)
Reads the file header into the CPU's memory.
|
void |
setDate(int whatDate,
int dateToSet)
Sets the date in the header.
|
void |
setFileDates(java.io.File f)
Sets dates of files, if necessary.
|
void |
setSMSQEFilename(java.lang.String name)
Sets the (SMSQE) filename in the header.
|
void |
setVersion(int version)
Sets the version in the header.
|
int |
writeFileHeader(MC68000Cpu cpu,
int position)
Writes the first 14 bytes of the fileheader from SMSQE to the file.
|
int readFileheader(MC68000Cpu cpu, int position, int bufflen)
cpu
- the cpu with the memory.position
- where in that memory to put it.bufflen
- length of that buffer.int writeFileHeader(MC68000Cpu cpu, int position)
cpu
- the cpu with the memory.position
- start address of file header in that buffer.int getOffset()
For example, the SFA driver uses Types.QFAHeaderLength
(=68 at the time of writing) bytes at the beginning of the file for a header.
boolean flushHeader(java.nio.channels.FileChannel inoutChannel, boolean setDate)
inoutChannel
- the file channel to write to.setDate
- = true if the date should be set to that of the channel's closing.java.lang.String getSMSQEFilename()
void setSMSQEFilename(java.lang.String name)
name
- the new name to set in the header.int getDate(int whatDate)
whatDate
- what date do we want : 0 update date 2 : backup datevoid setDate(int whatDate, int dateToSet)
whatDate
- what date do we want : 0 update date 2 : backup datedateToSet
- the date to set as an SMSQE date (date and time in seconds as of 1.1.1961).int getVersion()
void setVersion(int version)
version
- the dversio to setvoid setFileDates(java.io.File f)
f
- the file in question