net.sourceforge.jpalm.palmdb
Class RecordImpl

java.lang.Object
  extended by net.sourceforge.jpalm.DataBlock
      extended by net.sourceforge.jpalm.palmdb.RecordImpl
All Implemented Interfaces:
Record

public class RecordImpl
extends DataBlock
implements Record

An implementation of a Palm database record.

See Also:
Record

Field Summary
protected  byte[] data
           
protected  RecordHeader header
           
 
Constructor Summary
RecordImpl()
          Creates a new record.
RecordImpl(byte[] data)
          Creates a new record from the byte array.
 
Method Summary
 void deserialize(byte[] data)
          Populate class properties from a byte array.
 boolean equals(java.lang.Object object)
           
 RecordHeader getHeader()
          Gets the header for this record.
 byte[] serialize()
          Create a byte array of the class properties.
 void setHeader(RecordHeader header)
          Sets the header for this record.
 
Methods inherited from class net.sourceforge.jpalm.DataBlock
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

header

protected RecordHeader header

data

protected byte[] data
Constructor Detail

RecordImpl

public RecordImpl()
Creates a new record.


RecordImpl

public RecordImpl(byte[] data)
Creates a new record from the byte array.

Parameters:
data - the byte array
See Also:
deserialize(byte[])
Method Detail

getHeader

public RecordHeader getHeader()
Description copied from interface: Record
Gets the header for this record.

Specified by:
getHeader in interface Record
Returns:
the header
See Also:
RecordHeader

setHeader

public void setHeader(RecordHeader header)
Description copied from interface: Record
Sets the header for this record.

Specified by:
setHeader in interface Record
Parameters:
header - the header
See Also:
RecordHeader

deserialize

public void deserialize(byte[] data)
Description copied from class: DataBlock
Populate class properties from a byte array.

Specified by:
deserialize in interface Record
Specified by:
deserialize in class DataBlock
Parameters:
data - the byte array

serialize

public byte[] serialize()
Description copied from class: DataBlock
Create a byte array of the class properties.

Specified by:
serialize in interface Record
Specified by:
serialize in class DataBlock
Returns:
the byte array

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class DataBlock