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

Provides functionality to decode a PDB formatted file into a. More...

Public Member Functions

PalmDB parse (byte[] b) throws IOException
 This method decodes a PDB file into a. More...
 

Detailed Description

Provides functionality to decode a PDB formatted file into a.

PalmDB

object given an

InputStream

.

This class is only used by the

PalmDB

object.

Sample usage:

PdbDecoder decoder = new PdbDecoder("sample.pdb");
PalmDB palmDB = decoder.parse();

This decoder has the following assumptions on the PDB file:

  1. There is only one RecordList section in the PDB.
  2. The indices in the RecordList are sorted in order, i.e. the first index refers to 0, and so forth.
  3. The raw in the section are sorted as well in order, i.e. first comes ahead of second , etc.

Other decoders assume these as well.

See also
PalmDB
Record

Definition at line 51 of file PdbDecoder.java.

Member Function Documentation

PalmDB org.openoffice.xmerge.converter.palm.PdbDecoder.parse ( byte[]  b) throws IOException
inline

This method decodes a PDB file into a.

PalmDB

object.

First, the header data is read using the

PdbHeader.read

method. Next, the RecordList section is read and the

offsets are stored for use when parsing the Records. Based on these offsets, the bytes corresponding to each

are read and each is stored in a

object. Lastly, the data is used to create a

PalmDB

object.

Parameters
b

Definition at line 67 of file PdbDecoder.java.

References header, and i.

Referenced by org.openoffice.xmerge.converter.palm.PalmDocument.read().


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