rossi.fstools.fs
Interface DiskStructure

All Known Subinterfaces:
SuperBlock
All Known Implementing Classes:
DirEntry, DiskChild, Ext2Inode, Ext2SuperBlock, FatDirEntry, FatSuperBlock, FBlock, GroupDesc, ItemHead, Key, Partition, PartitionTable, ReiserSuperBlock, VFatDirEntry

public interface DiskStructure

Interface for classes that represent data sturctures on disk.


Method Summary
 int getDataSize()
          Get the size in bytes of the structure.
 void loadFromBuffer(byte[] buffer, int offset)
          Loads the object from a memory buffer
 

Method Detail

getDataSize

public int getDataSize()
Get the size in bytes of the structure. For variable length sturctures this may represent the minimum length rather than the actual length.

Returns:
the size of the structure.

loadFromBuffer

public void loadFromBuffer(byte[] buffer,
                           int offset)
                    throws FsException
Loads the object from a memory buffer

Parameters:
buffer - a byte[] containing data to be read in populating the object
offset - a int indicating the offset within the buffer to start parsing.
Throws:
FsException - if a parse error occurs.