public abstract class AbstractConverter extends java.lang.Object implements DocumentConverter
DocumentConverter
Modifier and Type | Class and Description |
---|---|
static class |
AbstractConverter.AbstractConverterBuilder<B extends AbstractConverter.AbstractConverterBuilder<B>>
A builder for constructing an
AbstractConverter . |
Modifier and Type | Field and Description |
---|---|
protected DocumentFormatRegistry |
formatRegistry |
protected OfficeManager |
officeManager |
Modifier | Constructor and Description |
---|---|
protected |
AbstractConverter(OfficeManager officeManager,
DocumentFormatRegistry formatRegistry) |
Modifier and Type | Method and Description |
---|---|
protected abstract AbstractConversionJobWithSourceFormatUnspecified |
convert(AbstractSourceDocumentSpecs source)
Converts a source document using the given specifications.
|
ConversionJobWithOptionalSourceFormatUnspecified |
convert(java.io.File source)
Converts a source file that is stored on the local file system.
|
ConversionJobWithRequiredSourceFormatUnspecified |
convert(java.io.InputStream source)
Converts a source stream input stream.
|
ConversionJobWithRequiredSourceFormatUnspecified |
convert(java.io.InputStream source,
boolean closeStream)
Converts a source stream input stream.
|
DocumentFormatRegistry |
getFormatRegistry()
Gets all the
DocumentFormat supported by the converter. |
protected final OfficeManager officeManager
protected final DocumentFormatRegistry formatRegistry
protected AbstractConverter(OfficeManager officeManager, DocumentFormatRegistry formatRegistry)
public ConversionJobWithOptionalSourceFormatUnspecified convert(java.io.File source)
DocumentConverter
convert
in interface DocumentConverter
source
- The conversion input as a file.public ConversionJobWithRequiredSourceFormatUnspecified convert(java.io.InputStream source)
DocumentConverter
convert
in interface DocumentConverter
source
- The conversion input as an input stream.public ConversionJobWithRequiredSourceFormatUnspecified convert(java.io.InputStream source, boolean closeStream)
DocumentConverter
convert
in interface DocumentConverter
source
- The conversion input as an input stream.closeStream
- Whether the InputStream
is closed after the conversion terminates.protected abstract AbstractConversionJobWithSourceFormatUnspecified convert(AbstractSourceDocumentSpecs source)
source
- The conversion input as a document specifications.public DocumentFormatRegistry getFormatRegistry()
DocumentConverter
DocumentFormat
supported by the converter.getFormatRegistry
in interface DocumentConverter
DocumentFormatRegistry
containing the supported formats.