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

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.mdr.ConfigBase
      extended by uk.me.parabola.imgfmt.app.mdr.MdrSection
Direct Known Subclasses:
Mdr1, Mdr13, Mdr14, Mdr15, Mdr4, Mdr9, MdrMapSection

public abstract class MdrSection
extends ConfigBase

Super class of all sections

Author:
Steve Ratcliffe

Constructor Summary
MdrSection()
           
 
Method Summary
abstract  int getItemSize()
          The size of a record in the section.
protected  uk.me.parabola.imgfmt.app.mdr.MdrSection.PointerSizes getSizes()
           
protected  int numberToPointerSize(int n)
           
protected  void putMapIndex(ImgFileWriter writer, int mapIndex)
           
protected  void putN(ImgFileWriter writer, int n, int value)
           
protected  void putStringOffset(ImgFileWriter writer, int strOff)
           
 void setSizes(uk.me.parabola.imgfmt.app.mdr.MdrSection.PointerSizes sizes)
           
abstract  void writeSectData(ImgFileWriter writer)
          Write out the contents of this section.
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.ConfigBase
getConfig, isForDevice, setConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MdrSection

public MdrSection()
Method Detail

writeSectData

public abstract void writeSectData(ImgFileWriter writer)
Write out the contents of this section.

Parameters:
writer - Where to write it.

getItemSize

public abstract int getItemSize()
The size of a record in the section. This is not a constant and might vary on various factors, such as the file version, if we are preparing for a device, the number of maps etc.

Returns:
The size of a record in this section.

getSizes

protected uk.me.parabola.imgfmt.app.mdr.MdrSection.PointerSizes getSizes()

setSizes

public void setSizes(uk.me.parabola.imgfmt.app.mdr.MdrSection.PointerSizes sizes)

putMapIndex

protected void putMapIndex(ImgFileWriter writer,
                           int mapIndex)

putStringOffset

protected void putStringOffset(ImgFileWriter writer,
                               int strOff)

putN

protected void putN(ImgFileWriter writer,
                    int n,
                    int value)

numberToPointerSize

protected int numberToPointerSize(int n)