rossi.fstools.partition
Class Partition

java.lang.Object
  extended byrossi.fstools.partition.Partition
All Implemented Interfaces:
DiskStructure

public class Partition
extends java.lang.Object
implements DiskStructure


Field Summary
protected  byte boot
           
static byte DOS_EXTENDED_PARTITION
           
protected  byte endCyl
           
protected  byte endHead
           
protected  byte endSector
           
static byte LINUX_EXTENDED_PARTITION
           
protected  long numLBASector
           
protected  byte startCyl
           
protected  byte startHead
           
protected  long startLBA
           
protected  byte startSector
           
protected  byte system
           
static byte WIN98_EXTENDED_PARTITION
           
 
Constructor Summary
Partition()
           
 
Method Summary
 byte getBoot()
           
 int getDataSize()
          Returns the size in bytes of the structure
 byte getEndCyl()
           
 byte getEndHead()
           
 byte getEndSector()
           
 long getNumLBASector()
           
 byte getStartCyl()
           
 byte getStartHead()
           
 long getStartLBA()
           
 byte getStartSector()
           
 byte getSystem()
           
 boolean isExtended()
           
 void loadFromBuffer(byte[] buffer, int offset)
          Loads the object from a memory buffer
 void setBoot(byte aBoot)
           
 void setEndCyl(byte aEndCyl)
           
 void setEndHead(byte aEndHead)
           
 void setEndSector(byte aEndSector)
           
 void setNumLBASector(long aNumLBASector)
           
 void setStartCyl(byte aStartCyl)
           
 void setStartHead(byte aStartHead)
           
 void setStartLBA(long aStartLBA)
           
 void setStartSector(byte aStartSector)
           
 void setSystem(byte aSystem)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

boot

protected byte boot

startHead

protected byte startHead

startSector

protected byte startSector

startCyl

protected byte startCyl

system

protected byte system

endHead

protected byte endHead

endSector

protected byte endSector

endCyl

protected byte endCyl

startLBA

protected long startLBA

numLBASector

protected long numLBASector

DOS_EXTENDED_PARTITION

public static final byte DOS_EXTENDED_PARTITION
See Also:
Constant Field Values

LINUX_EXTENDED_PARTITION

public static final byte LINUX_EXTENDED_PARTITION
See Also:
Constant Field Values

WIN98_EXTENDED_PARTITION

public static final byte WIN98_EXTENDED_PARTITION
See Also:
Constant Field Values
Constructor Detail

Partition

public Partition()
Method Detail

getBoot

public byte getBoot()

setBoot

public void setBoot(byte aBoot)

getStartHead

public byte getStartHead()

setStartHead

public void setStartHead(byte aStartHead)

getStartSector

public byte getStartSector()

setStartSector

public void setStartSector(byte aStartSector)

getStartCyl

public byte getStartCyl()

setStartCyl

public void setStartCyl(byte aStartCyl)

getSystem

public byte getSystem()

setSystem

public void setSystem(byte aSystem)

getEndHead

public byte getEndHead()

setEndHead

public void setEndHead(byte aEndHead)

getEndSector

public byte getEndSector()

setEndSector

public void setEndSector(byte aEndSector)

getEndCyl

public byte getEndCyl()

setEndCyl

public void setEndCyl(byte aEndCyl)

getStartLBA

public long getStartLBA()

setStartLBA

public void setStartLBA(long aStartLBA)

getNumLBASector

public long getNumLBASector()

setNumLBASector

public void setNumLBASector(long aNumLBASector)

isExtended

public boolean isExtended()

getDataSize

public int getDataSize()
Returns the size in bytes of the structure

Specified by:
getDataSize in interface DiskStructure
Returns:
the size of the structure.

loadFromBuffer

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

Specified by:
loadFromBuffer in interface DiskStructure
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.

toString

public java.lang.String toString()