LibreOffice Module xmerge (master) 1
Public Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.converter.palm.Record Class Reference

Contains the raw bytes for a Record in a PDB. More...

Public Member Functions

 Record ()
 Default constructor. More...
 
 Record (byte[] d)
 Constructor to create a Record filled with bytes. More...
 
 Record (byte[] d, byte attrs)
 Constructor to create a Record filled with bytes and assign Record attributes. More...
 
int getSize ()
 This method returns the number of bytes in this object. More...
 
byte[] getBytes ()
 This method returns the contents of this Object. More...
 
byte getAttributes ()
 
void write (OutputStream outs) throws IOException
 Write out the Record attributes and Record length followed by the data in this Record object. More...
 
void read (InputStream ins) throws IOException
 Read the necessary data to create a PDB from the InputStream. More...
 
boolean equals (Object obj)
 Override equals method of Object. More...
 
int hashCode ()
 

Private Attributes

byte[] data
 Record byte array. More...
 
byte attributes = 0
 Record attributes. More...
 

Detailed Description

Contains the raw bytes for a Record in a PDB.

Note that it is not associated with a Record number or ID.

See also
PalmDocument
PalmDB

Definition at line 35 of file Record.java.

Constructor & Destructor Documentation

◆ Record() [1/3]

org.openoffice.xmerge.converter.palm.Record.Record ( )
inline

Default constructor.

Definition at line 46 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.data.

Referenced by org.openoffice.xmerge.converter.palm.Record.equals().

◆ Record() [2/3]

org.openoffice.xmerge.converter.palm.Record.Record ( byte[]  d)
inline

Constructor to create a Record filled with bytes.

Note that this does not check for 64k Record sizes. User of this class must check for that.

Parameters
dbyte array contents for this object.

Definition at line 58 of file Record.java.

References d.

◆ Record() [3/3]

org.openoffice.xmerge.converter.palm.Record.Record ( byte[]  d,
byte  attrs 
)
inline

Constructor to create a Record filled with bytes and assign Record attributes.

Note that this does not check for 64k Record sizes. User of this class must check for that.

Parameters
dbyte array contents for this object.
attrsRecord attributes.

Definition at line 72 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.attributes, d, org.openoffice.xmerge.converter.palm.Record.data, and System.

Member Function Documentation

◆ equals()

boolean org.openoffice.xmerge.converter.palm.Record.equals ( Object  obj)
inline

Override equals method of Object.

Two Record objects are equal if they contain the same bytes in the array and the same attributes.

This is used primarily for testing purposes only for now.

Parameters
objA Record object to compare with
Returns
true if obj is equal, otherwise false.

Definition at line 153 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.attributes, org.openoffice.xmerge.converter.palm.Record.data, org.openoffice.xmerge.converter.palm.Record.getAttributes(), org.openoffice.xmerge.converter.palm.Record.getSize(), i, and org.openoffice.xmerge.converter.palm.Record.Record().

◆ getAttributes()

byte org.openoffice.xmerge.converter.palm.Record.getAttributes ( )
inline

This method returns the Record attributes.

Record attributes consists of (from high to low bit)

delete (1) - dirty (1) - busy (1) - secret (1) - category (4)
Returns
Record attribute.

Definition at line 105 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.attributes.

Referenced by org.openoffice.xmerge.converter.palm.Record.equals(), and org.openoffice.xmerge.converter.palm.PdbEncoder.write().

◆ getBytes()

byte[] org.openoffice.xmerge.converter.palm.Record.getBytes ( )
inline

This method returns the contents of this Object.

Returns
Contents in byte array

Definition at line 92 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.data.

Referenced by org.openoffice.xmerge.converter.palm.PdbEncoder.write().

◆ getSize()

int org.openoffice.xmerge.converter.palm.Record.getSize ( )
inline

This method returns the number of bytes in this object.

Returns
Number of bytes in this object.

Definition at line 83 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.data.

Referenced by org.openoffice.xmerge.converter.palm.Record.equals(), and org.openoffice.xmerge.converter.palm.PdbEncoder.write().

◆ hashCode()

int org.openoffice.xmerge.converter.palm.Record.hashCode ( )
inline

Definition at line 172 of file Record.java.

◆ read()

void org.openoffice.xmerge.converter.palm.Record.read ( InputStream  ins) throws IOException
inline

Read the necessary data to create a PDB from the InputStream.

Parameters
insThe InputStream to read data from in order to restore the object.
Exceptions
IOExceptionIf any I/O error occurs.

Definition at line 132 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.attributes, org.openoffice.xmerge.converter.palm.Record.data, and in.

◆ write()

void org.openoffice.xmerge.converter.palm.Record.write ( OutputStream  outs) throws IOException
inline

Write out the Record attributes and Record length followed by the data in this Record object.

Parameters
outsThe OutputStream to write the object.
Exceptions
IOExceptionIf any I/O error occurs.

Definition at line 117 of file Record.java.

References org.openoffice.xmerge.converter.palm.Record.attributes, and org.openoffice.xmerge.converter.palm.Record.data.

Member Data Documentation

◆ attributes

byte org.openoffice.xmerge.converter.palm.Record.attributes = 0
private

◆ data

byte [] org.openoffice.xmerge.converter.palm.Record.data
private

The documentation for this class was generated from the following file: