LibreOffice Module xmerge (master)
1
|
Provides classes for converting Palm database data to/from a. More...
Classes | |
class | PalmDB |
This class contains data for a single Palm database for use during a conversion process. More... | |
class | PalmDocument |
A. More... | |
class | PdbDecoder |
Provides functionality to decode a PDB formatted file into a. More... | |
class | PdbEncoder |
Provides functionality to encode a. More... | |
class | PdbHeader |
Class used only internally by. | |
class | PdbUtil |
Contains common static methods and constants for use within the package. More... | |
class | Record |
Contains the raw bytes for a. More... | |
Provides classes for converting Palm database data to/from a.
object, which can be used by the framework.
This package provides classes that handle the writing of data to an
object for the DocumentSerializer interface for; as well as the reading of data from an
object for the framework's DocumentDeserializer interface. Both these framework interfaces are simply converters from server-side documents to device specific documents and vice-versa. Since all Palm databases have a general record oriented format, a Palm database converter specific I/O stream format is specified for the Palm sync client application to handle the byte stream in a generic way. This also means that Palm database converters should read and/or write using this I/O stream format as specified in the next section.
Note that the format of the byte stream is not exactly that of a PDB file encoding. It does not need to contain the PDB header information nor record indices section. Instead, it contains the following ...
set header 4 bytes - creator id 4 bytes - type id 2 bytes - PDB header version 2 bytes - PDB header attribute unsigned 2 bytes - number of PDB data to follow
for each PDB, 32 bytes - name of PDB i unsigned 2 bytes - number of records in PDB i
for each record contained in PDB i, 1 byte - record attributes unsigned 2 bytes - size of record j in PDB i x bytes - data
Note that each PDB section is appended by another if there is more than one.
Since the
class takes care of the writing and reading of this format through its
and
methods, respectively, this format shall also be referred to as the PalmDocument stream format.
When converting from a server document to device document(s), the framework requires writing the device document(s) to an
object via the
interface. Note that a single server document may be converted into multiple PDB's on the Palm device. Each worksheet in the document is converted into a
. Thus, if there is more than one worksheet in the document, more than one
will be produced by the
.
A
creates a
object, which contains all of the
. The write method to write to the given
. The
object will take care of writing the data in the specified format.
A
can use the
object's read method to fill in all the
object's data.
The
object's read and write functions are provided by the
and
objects. The
class provides the functionality of encoding a
object into an
, while the
class provides the functionality of decoding a PDB file into an
.
Refer to the class description of each for usage.
Methods in these classes are not thread safe for performance reasons. Users of these classes will have to make sure that the usage of these classes are done in a proper manner. Possibly more on this later.