OpenOffice.org
XMerge API

org.openoffice.xmerge
Interface Document

All Known Implementing Classes:
DOMDocument, PalmDocument, OfficeDocument, PxlDocument, PocketWordDocument

public interface Document

A Document represents any Document to be converted and the resulting Document from any conversion.

It is created by the PluginFactory object's createOfficeDocument method or the createDeviceDocument method.

See Also:
PluginFactory

Method Summary
 java.lang.String getFileName()
          Returns the Document name with file extension.
 java.lang.String getName()
          Returns the Document name with no file extension.
 void read(java.io.InputStream is)
          Reads the content from the InputStream into the Document.
 void write(java.io.OutputStream os)
          Writes out the Document content to the specified OutputStream.
 

Method Detail

getFileName

public java.lang.String getFileName()
Returns the Document name with file extension.
Returns:
The Document name with file extension.

getName

public java.lang.String getName()
Returns the Document name with no file extension.
Returns:
The Document name with no file extension.

read

public void read(java.io.InputStream is)
          throws java.io.IOException

Reads the content from the InputStream into the Document.

This method may not be thread-safe. Implementations may or may not synchronize this method. User code (i.e. caller) must make sure that calls to this method are thread-safe.

Parameters:
is - InputStream to read in the Document content.
Throws:
java.io.IOException - If any I/O error occurs.

write

public void write(java.io.OutputStream os)
           throws java.io.IOException

Writes out the Document content to the specified OutputStream.

This method may not be thread-safe. Implementations may or may not synchronize this method. User code (i.e. caller) must make sure that calls to this method are thread-safe.

Parameters:
os - OutputStream to write out the Document content.
Throws:
java.io.IOException - If any I/O error occurs.

OpenOffice.org
XMerge API

Copyright © 2002 OpenOffice.org