|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.app.CommonHeader
public abstract class CommonHeader
The header that is common to all application files within the .img file. It basically contains two things of interest, the size of the header and its type. The type is usually of the form 'GARMIN.YYY' where YYY is the file extension of the type eg TRE, LBL, RGN etc.
Field Summary | |
---|---|
protected static int |
COMMON_HEADER_LEN
|
Constructor Summary | |
---|---|
protected |
CommonHeader(int headerLength,
java.lang.String type)
|
Method Summary | |
---|---|
int |
getHeaderLength()
|
protected abstract void |
readFileHeader(ImgFileReader reader)
Read the rest of the header. |
void |
readHeader(ImgFileReader reader)
Read the common header. |
protected abstract void |
writeFileHeader(ImgFileWriter writer)
Write the rest of the header. |
void |
writeHeader(ImgFileWriter writer)
Writes out the header that is common to all the file types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int COMMON_HEADER_LEN
Constructor Detail |
---|
protected CommonHeader(int headerLength, java.lang.String type)
Method Detail |
---|
public final void writeHeader(ImgFileWriter writer)
writer
- Used to write the header.public final void readHeader(ImgFileReader reader) throws ReadFailedException
reader
- Used to read the header.
ReadFailedException
protected abstract void readFileHeader(ImgFileReader reader) throws ReadFailedException
reader
- The header is read from here.
ReadFailedException
protected abstract void writeFileHeader(ImgFileWriter writer)
writer
- The header is written here.public int getHeaderLength()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |