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

A PalmDocument is palm implementation of the Document interface. More...

Inheritance diagram for org.openoffice.xmerge.converter.palm.PalmDocument:
[legend]
Collaboration diagram for org.openoffice.xmerge.converter.palm.PalmDocument:
[legend]

Public Member Functions

 PalmDocument (InputStream is) throws IOException
 Constructor to create a PalmDocument from an InputStream. More...
 
 PalmDocument (String name, int creatorID, int typeID, int version, short attribute, Record[] recs) throws UnsupportedEncodingException
 Constructor to create a PalmDocument with Record objects. More...
 
void read (InputStream is) throws IOException
 Reads in a file from the InputStream. More...
 
void write (OutputStream os) throws IOException
 Writes the PalmDocument to an OutputStream. More...
 
PalmDB getPdb ()
 Returns the PalmDB contained in this object. More...
 
void setPdb (PalmDB pdb)
 Sets the PalmDocument to a new PalmDB value. More...
 
String getFileName ()
 Returns the name of the file. More...
 
String getName ()
 Returns the Document name. More...
 
void write (OutputStream os) throws IOException
 Writes out the Document content to the specified OutputStream. More...
 
void read (InputStream is) throws IOException
 Reads the content from the InputStream into the Document. More...
 
String getName ()
 Returns the Document name with no file extension. More...
 
String getFileName ()
 Returns the Document name with file extension. More...
 

Private Attributes

PalmDB pdb
 The internal representation of a pdb. More...
 
String fileName
 The file name. More...
 

Detailed Description

A PalmDocument is palm implementation of the Document interface.

This implementation allows the Palm device format to be read via an InputStream and written via an OutputStream.

Definition at line 37 of file PalmDocument.java.

Constructor & Destructor Documentation

◆ PalmDocument() [1/2]

org.openoffice.xmerge.converter.palm.PalmDocument.PalmDocument ( InputStream  is) throws IOException
inline

Constructor to create a PalmDocument from an InputStream.

Parameters
isInputStream containing a PDB.
Exceptions
IOExceptionIf any I/O error occurs.

Definition at line 53 of file PalmDocument.java.

References org.openoffice.xmerge.converter.palm.PalmDocument.read().

◆ PalmDocument() [2/2]

org.openoffice.xmerge.converter.palm.PalmDocument.PalmDocument ( String  name,
int  creatorID,
int  typeID,
int  version,
short  attribute,
Record[]  recs 
) throws UnsupportedEncodingException
inline

Constructor to create a PalmDocument with Record objects.

recs.length can be zero for an empty PDB.

Parameters
nameSuggested PDB name in String.
creatorIDThe PDB Creator ID.
typeIDThe PDB Type ID.
versionThe PDB header version.
attributeThe PDB header attribute.
recsArray of Record objects.
Exceptions
NullPointerExceptionIf recs is null.

Definition at line 71 of file PalmDocument.java.

References attribute, org.openoffice.xmerge.converter.palm.PalmDocument.fileName, org.openoffice.xmerge.converter.palm.PalmDB.getPDBNameString(), name, org.openoffice.xmerge.converter.palm.PalmDocument.pdb, and typeID.

Member Function Documentation

◆ getFileName()

String org.openoffice.xmerge.converter.palm.PalmDocument.getFileName ( )
inline

Returns the name of the file.

Returns
The name of the file represented in the PalmDocument.

Implements org.openoffice.xmerge.Document.

Definition at line 136 of file PalmDocument.java.

References org.openoffice.xmerge.converter.palm.PalmDocument.fileName, and String.

◆ getName()

String org.openoffice.xmerge.converter.palm.PalmDocument.getName ( )
inline

Returns the Document name.

Returns
The Document name.

Implements org.openoffice.xmerge.Document.

Definition at line 145 of file PalmDocument.java.

References org.openoffice.xmerge.converter.palm.PalmDocument.fileName, and String.

◆ getPdb()

PalmDB org.openoffice.xmerge.converter.palm.PalmDocument.getPdb ( )
inline

Returns the PalmDB contained in this object.

Returns
The PalmDB.

Definition at line 115 of file PalmDocument.java.

References org.openoffice.xmerge.converter.palm.PalmDocument.pdb.

◆ read()

void org.openoffice.xmerge.converter.palm.PalmDocument.read ( InputStream  is) throws IOException
inline

◆ setPdb()

void org.openoffice.xmerge.converter.palm.PalmDocument.setPdb ( PalmDB  pdb)
inline

Sets the PalmDocument to a new PalmDB value.

Parameters
pdbThe new PalmDB value.

Definition at line 124 of file PalmDocument.java.

References org.openoffice.xmerge.converter.palm.PalmDocument.fileName, org.openoffice.xmerge.converter.palm.PalmDB.getPDBNameString(), name, org.openoffice.xmerge.converter.palm.PalmDocument.pdb, and String.

◆ write()

void org.openoffice.xmerge.converter.palm.PalmDocument.write ( OutputStream  os) throws IOException
inline

Writes the PalmDocument to an OutputStream.

Parameters
osThe OutputStream to write the content.
Exceptions
IOExceptionIf any I/O error occurs.

Implements org.openoffice.xmerge.Document.

Definition at line 105 of file PalmDocument.java.

References org.openoffice.xmerge.converter.palm.PalmDocument.pdb, and org.openoffice.xmerge.converter.palm.PdbEncoder.write().

Member Data Documentation

◆ fileName

String org.openoffice.xmerge.converter.palm.PalmDocument.fileName
private

◆ pdb

PalmDB org.openoffice.xmerge.converter.palm.PalmDocument.pdb
private

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