|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Converter
This is an interface for a converter, which offers conversion of
OpenDocument (or OpenOffice.org 1.x) documents into a specific format.
Instances of this interface are created using the
ConverterFactory
Method Summary | |
---|---|
ConverterResult |
convert(java.io.File source,
java.lang.String sTargetFileName)
Convert a document |
ConverterResult |
convert(java.io.InputStream is,
java.lang.String sTargetFileName)
Convert a document |
Config |
getConfig()
Get the interface for the configuration of this converter |
void |
readTemplate(java.io.File file)
Read a template to use as a base for the converted document. |
void |
readTemplate(java.io.InputStream is)
Read a template to use as a base for the converted document. |
void |
setGraphicConverter(GraphicConverter gc)
Define a GraphicConverter implementation to use for
conversion of graphic files. |
Method Detail |
---|
Config getConfig()
void setGraphicConverter(GraphicConverter gc)
GraphicConverter
implementation to use for
conversion of graphic files. If no converter is specified, graphic
files will not be converted into other formats.
gc
- the GraphicConverter
to usevoid readTemplate(java.io.InputStream is) throws java.io.IOException
Converter
implementation.
is
- an InputStream
from which to read the template
java.io.IOException
- if some exception occurs while reading the templatevoid readTemplate(java.io.File file) throws java.io.IOException
Converter
implementation.
file
- a file from which to read the template
java.io.IOException
- if the file does not exist or some exception occurs
while reading the templateConverterResult convert(java.io.InputStream is, java.lang.String sTargetFileName) throws java.io.IOException
is
- an InputStream
from which to read the source document.sTargetFileName
- the file name to use for the converted document
(if the converted document is a compound document consisting consisting
of several files, this name will be used for the master document)
ConverterResult
containing the converted document
java.io.IOException
- if some exception occurs while reading the documentConverterResult convert(java.io.File source, java.lang.String sTargetFileName) throws java.io.FileNotFoundException, java.io.IOException
source
- a File
from which to read the source document.sTargetFileName
- the file name to use for the converted document
(if the converted document is a compound document consisting consisting
of several files, this name will be used for the master document)
ConverterResult
containing the converted document
java.io.FileNotFoundException
- if the file does not exist
java.io.IOException
- if some exception occurs while reading the document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |