|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openoffice.xmerge.Convert
The Convert
class manages a conversion from one
mime-type to another. The ConvertFactory
is
responsible for returning the appropriate Convert
class for a specified conversion. This class is responsible
for all interactions with the PluginFactory
implementation.
ConverterFactory
,
PluginFactory
,
ConverterInfo
Constructor Summary | |
Convert(ConverterInfo ci,
boolean toOffice)
Construct a Convert class with specified ConvertInfo
registry information. |
Method Summary | |
void |
addInputStream(java.lang.String name,
java.io.InputStream is)
Adds an InputStream to be used as input by the
Convert class. |
void |
addInputStream(java.lang.String name,
java.io.InputStream is,
boolean isZip)
Adds an InputStream to be used as input by the
Convert class. |
java.lang.Object |
clone()
Clones a Convert object so another Convert object can do the same conversion. |
ConvertData |
convert()
Convert the input specified in calls to the addInputStream
method to the output format specified by this Convert
class. |
Document |
getDeviceDocument(java.lang.String name,
java.io.InputStream is)
Returns the appropriate "Device" Document
object for this plug-in. |
DocumentMerger |
getDocumentMerger(Document origDoc)
Adds the original Document to the Convert Class. |
Document |
getOfficeDocument(java.lang.String name,
java.io.InputStream is)
Returns the appropriate "Office" Document
object for this plug-in. |
void |
reset()
Resets the input queue, so that the user can use this class to perform another conversion. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Convert(ConverterInfo ci, boolean toOffice)
ConvertInfo
registry information.ci
- A ConvertInfo
object containing
registry information corresponding to a
specific plug-in.toOffice
- true if converting to the Office format,
false if converting to the device format.Method Detail |
public void addInputStream(java.lang.String name, java.io.InputStream is) throws java.io.IOException
InputStream
to be used as input by the
Convert
class. It is possible that many files
need to be converted into a single output Documetn
,
so this function may be called more than one time. It is the
plug-in's responsibility to know how to handle the input.name
- The name corresponding to the InputStream
.is
- InputStream
to be used as input.java.io.IOException
- If any I/O error occurs.public void addInputStream(java.lang.String name, java.io.InputStream is, boolean isZip) throws java.io.IOException
InputStream
to be used as input by the
Convert
class. It is possible that many files
need to be converted into a single output Documetn
,
so this function may be called more than one time. It is the
plug-in's responsibility to know how to handle the input.name
- The name corresponding to the InputStream
.is
- InputStream
to be used as input.isZip
- boolean
to identify that incoming stream is * zippedjava.io.IOException
- If any I/O error occurs.public java.lang.Object clone()
InputStream objects passed
in via calls to the addInputStream
method are not
copied.
- Overrides:
clone
in class java.lang.Object
- Returns:
- The cloned
Convert
object.
public ConvertData convert() throws ConvertException, java.io.IOException
addInputStream
method to the output format specified by this Convert
class.ConvertException
- If any conversion error occurs.java.io.IOException
- If any I/O error occurs.public Document getDeviceDocument(java.lang.String name, java.io.InputStream is) throws java.io.IOException
Document
object for this plug-in.name
- The name of the Document
to create.is
- The InputStream
corresponding to the
Document
to create.Document
object for this plug-in.java.io.IOException
- If any I/O error occurs.public DocumentMerger getDocumentMerger(Document origDoc) throws java.io.IOException
name
- The Document
name.is
- InputStream
object corresponding
to the Document
.java.io.IOException
- If any I/O error occurs.public Document getOfficeDocument(java.lang.String name, java.io.InputStream is) throws java.io.IOException
Document
object for this plug-in.name
- The name of the Document
to create.is
- The InputStream
corresponding to the
Document
to create.Document
object for this plug-in.java.io.IOException
- If any I/O error occurs.public void reset()
addInputStream
method to accept input for the next
conversion.
|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |