uk.me.parabola.imgfmt.app.mdr
Class MDRHeader

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.CommonHeader
      extended by uk.me.parabola.imgfmt.app.mdr.MDRHeader

public class MDRHeader
extends CommonHeader

The header of the MDR file. Note that there are many possible sections in this file and that only a certain number of them are needed. There are also many different lengths for the record sizes of the sections. Finally there are different sections and record sizes for the version that gets loaded into the gmapsupp.

Author:
Steve Ratcliffe

Field Summary
 
Fields inherited from class uk.me.parabola.imgfmt.app.CommonHeader
COMMON_HEADER_LEN
 
Constructor Summary
MDRHeader(int headerLen)
           
 
Method Summary
protected  void readFileHeader(ImgFileReader reader)
          Read the rest of the header.
 void setEnd(int sectionNumber, int position)
           
 void setExtraValue(int sectionNumber, int extraValue)
           
 void setItemSize(int sectionNumber, int itemSize)
           
 void setPosition(int sectionNumber, int position)
           
protected  void writeFileHeader(ImgFileWriter writer)
          Write out the application header.
 
Methods inherited from class uk.me.parabola.imgfmt.app.CommonHeader
getHeaderLength, readHeader, writeHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDRHeader

public MDRHeader(int headerLen)
Method Detail

readFileHeader

protected void readFileHeader(ImgFileReader reader)
                       throws ReadFailedException
Description copied from class: CommonHeader
Read the rest of the header. Specific to the given file. It is guaranteed that the file position will be set to the correct place before this is called.

Specified by:
readFileHeader in class CommonHeader
Parameters:
reader - The header is read from here.
Throws:
ReadFailedException

writeFileHeader

protected void writeFileHeader(ImgFileWriter writer)
Write out the application header.

Specified by:
writeFileHeader in class CommonHeader
Parameters:
writer - The header is written here.

setItemSize

public void setItemSize(int sectionNumber,
                        int itemSize)

setExtraValue

public void setExtraValue(int sectionNumber,
                          int extraValue)

setPosition

public void setPosition(int sectionNumber,
                        int position)

setEnd

public void setEnd(int sectionNumber,
                   int position)