com.webcodepro.applecommander.storage.physical
Class UniversalDiskImageLayout

java.lang.Object
  extended by com.webcodepro.applecommander.storage.physical.ByteArrayImageLayout
      extended by com.webcodepro.applecommander.storage.physical.UniversalDiskImageLayout

public class UniversalDiskImageLayout
extends ByteArrayImageLayout

Manages the physical 2IMG disk.

Author:
Rob Greene (RobGreene@users.sourceforge.net)

Field Summary
static int OFFSET
          This is the 2IMG offset.
 
Constructor Summary
UniversalDiskImageLayout(byte[] diskImage)
          Construct a UniversalDiskImageLayout.
UniversalDiskImageLayout(byte[] diskImage, boolean changed)
          Construct a UniversalDiskImageLayout.
UniversalDiskImageLayout(int size)
          Construct a UniversalDiskImageLayout.
 
Method Summary
 byte[] readBytes(int start, int length)
          Extract a portion of the disk image.
 void writeBytes(int start, byte[] bytes)
          Write data to the disk image.
 
Methods inherited from class com.webcodepro.applecommander.storage.physical.ByteArrayImageLayout
getDiskImage, getPhysicalSize, hasChanged, setChanged, setDiskImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OFFSET

public static final int OFFSET
This is the 2IMG offset.

See Also:
Constant Field Values
Constructor Detail

UniversalDiskImageLayout

public UniversalDiskImageLayout(byte[] diskImage)
Construct a UniversalDiskImageLayout.


UniversalDiskImageLayout

public UniversalDiskImageLayout(byte[] diskImage,
                                boolean changed)
Construct a UniversalDiskImageLayout.


UniversalDiskImageLayout

public UniversalDiskImageLayout(int size)
Construct a UniversalDiskImageLayout.

Method Detail

readBytes

public byte[] readBytes(int start,
                        int length)
Extract a portion of the disk image.

Overrides:
readBytes in class ByteArrayImageLayout

writeBytes

public void writeBytes(int start,
                       byte[] bytes)
Write data to the disk image.

Overrides:
writeBytes in class ByteArrayImageLayout