Converter
, Converter
, ConverterBase
, ConverterPalette
, EPUBConverter
, Html5Converter
, Xhtml10Converter
, Xhtml11Converter
, XhtmlMathMLConverter
public interface Converter
ConverterFactory
Modifier and Type | Method | Description |
---|---|---|
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
|
ConverterResult |
convert(org.w3c.dom.Document dom,
java.lang.String sTargetFileName,
boolean bDestructive) |
Convert a document
|
Config |
getConfig() |
Get the interface for the configuration of this converter
|
void |
readResource(java.io.File file,
java.lang.String sFileName,
java.lang.String sMediaType) |
Read a style sheet to include with the converted document.
|
void |
readResource(java.io.InputStream is,
java.lang.String sFileName,
java.lang.String sMediaType) |
Read a resource to include with the converted document.
|
void |
readStyleSheet(java.io.File file) |
Read a style sheet to include with the converted document.
|
void |
readStyleSheet(java.io.InputStream is) |
Read a style sheet to include with the converted document.
|
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. |
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 templatejava.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 templatejava.io.IOException
- if the file does not exist or some exception occurs
while reading the templatevoid readStyleSheet(java.io.InputStream is) throws java.io.IOException
Converter
implementation.is
- an InputStream
from which to read the style sheetjava.io.IOException
- if some exception occurs while reading the style sheetvoid readStyleSheet(java.io.File file) throws java.io.IOException
Converter
implementation.file
- a file from which to read the style sheetjava.io.IOException
- if the file does not exist or some exception occurs
while reading the style sheetvoid readResource(java.io.InputStream is, java.lang.String sFileName, java.lang.String sMediaType) throws java.io.IOException
is
- an InputStream
from which to read the resourcesFileName
- the file name to use for the resourcesMediaType
- the media type of the resource, if null the media type will be guessed from the file namejava.io.IOException
- if some exception occurs while reading the resourcevoid readResource(java.io.File file, java.lang.String sFileName, java.lang.String sMediaType) throws java.io.IOException
file
- a file from which to read the style sheetsFileName
- the file name to use for the resourcesMediaType
- the media type of the resource, if null the media type will be guessed from the file namejava.io.IOException
- if the file does not exist or some exception occurs
while reading the resourceConverterResult 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 documentjava.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 documentjava.io.FileNotFoundException
- if the file does not existjava.io.IOException
- if some exception occurs while reading the documentConverterResult convert(org.w3c.dom.Document dom, java.lang.String sTargetFileName, boolean bDestructive) throws java.io.IOException
dom
- a DOM tree representing the document as flat XMLsTargetFileName
- 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)bDestructive
- set to true if the converter is allowed to remove contents from the DOM tree (to save memory)ConverterResult
containing the converted documentjava.io.IOException
- if some exception occurs while reading the document