19package org.openoffice.xmerge.converter.palm;
21import java.io.OutputStream;
22import java.io.InputStream;
23import java.io.DataOutputStream;
24import java.io.DataInputStream;
25import java.io.IOException;
72 public Record(
byte[] d,
byte attrs) {
73 data =
new byte[
d.length];
117 public void write(OutputStream outs)
throws IOException {
118 DataOutputStream out =
new DataOutputStream(outs);
120 out.writeShort(
data.length);
132 public void read(InputStream ins)
throws IOException {
133 DataInputStream
in =
new DataInputStream(ins);
135 int len =
in.readUnsignedShort();
136 data =
new byte[len];
154 if (!(obj instanceof
Record)) {
162 for (
int i = 0;
i <
data.length;
i++) {
Contains the raw bytes for a Record in a PDB.
byte[] data
Record byte array.
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.
boolean equals(Object obj)
Override equals method of Object.
void write(OutputStream outs)
Write out the Record attributes and Record length followed by the data in this Record object.
int getSize()
This method returns the number of bytes in this object.
Record()
Default constructor.
void read(InputStream ins)
Read the necessary data to create a PDB from the InputStream.
byte[] getBytes()
This method returns the contents of this Object.
byte attributes
Record attributes.