|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openoffice.xmerge.converter.palm.Record
Contains the raw bytes for a Record
in a PDB.
Note that it is not associated with a Record
number
or ID.
PalmDocument
,
PalmDB
Constructor Summary | |
Record()
Default constructor. |
|
Record(byte[] d)
Constructor to create a Record filled with
bytes. |
|
Record(byte[] d,
byte attrs)
Constructor to create a Record filled with
bytes and assign Record attributes. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Override equals method of Object . |
byte |
getAttributes()
This method returns the Record attributes. |
byte[] |
getBytes()
This method returns the contents of this Object . |
int |
getSize()
This method returns the number of bytes in this object. |
void |
read(java.io.InputStream ins)
Read the necessary data to create a PDB from the InputStream . |
void |
write(java.io.OutputStream outs)
Write out the Record attributes and
Record length followed by the data in this
Record object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Record()
public Record(byte[] d)
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.
d
- byte
array contents for this object.public Record(byte[] d, byte attrs)
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.
d
- byte
array contents for this object.attrs
- Record
attributes.Method Detail |
public boolean equals(java.lang.Object obj)
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.
equals
in class java.lang.Object
obj
- A Record
object to compare withpublic byte getAttributes()
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)
Record
attribute.public byte[] getBytes()
Object
.byte
arraypublic int getSize()
public void read(java.io.InputStream ins) throws java.io.IOException
InputStream
.in
- The InputStream
to read data from
in order to restore the object
.java.io.IOException
- If any I/O error occurs.public void write(java.io.OutputStream outs) throws java.io.IOException
Record
attributes and
Record
length followed by the data in this
Record
object.out
- The OutputStream
to write the object.java.io.IOException
- If any I/O error occurs.
|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |