public class EditorHandler extends Object
Main class, which encapsulates conversion methods
Constructor and Description |
---|
EditorHandler() |
Modifier and Type | Method and Description |
---|---|
static IDocumentLoadOptions |
detectOptionsFromExtension(String filename)
Returns a default instance of specific document load options class by analyzing the specified filename extension
|
static void |
toDocument(OutputHtmlDocument inputHtml,
OutputStream outputDocumentContent,
IDocumentSaveOptions saveOptions)
Converts specified HTML document to the resultant document of specified type and saves its content to specified stream
|
static InputHtmlDocument |
toHtml(InputStream inputDocumentContent)
Converts a document of supported type to the HTML format, automatically detects the type of the input document and performs a conversion
in accordance to the default options for this format
|
static InputHtmlDocument |
toHtml(InputStream inputDocumentContent,
IDocumentLoadOptions loadOptions)
Converts document of supported type to the HTML format using specified format-specific options.
|
public static IDocumentLoadOptions detectOptionsFromExtension(String filename)
Returns a default instance of specific document load options class by analyzing the specified filename extension
filename
- Filename with extension or sole extensionpublic static void toDocument(OutputHtmlDocument inputHtml, OutputStream outputDocumentContent, IDocumentSaveOptions saveOptions) throws Exception
Converts specified HTML document to the resultant document of specified type and saves its content to specified stream
inputHtml
- Input HTML document, which should be converted to some document formatoutputDocumentContent
- Output stream, in which the content of the resultant document will be recorded. Should support writing.saveOptions
- Document saving options, which define the format of the resultant document,
and also general and format-specific saving options.Exception
public static InputHtmlDocument toHtml(InputStream inputDocumentContent) throws Exception
Converts a document of supported type to the HTML format, automatically detects the type of the input document and performs a conversion in accordance to the default options for this format
inputDocumentContent
- Content of the input document. Stream should not be NULL and should support reading.Exception
public static InputHtmlDocument toHtml(InputStream inputDocumentContent, IDocumentLoadOptions loadOptions) throws Exception
Converts document of supported type to the HTML format using specified format-specific options.
inputDocumentContent
- Content of the input document. Stream should not be NULL and should support reading.loadOptions
- Format-specific document options, which allows to tune-up conversion process.Exception
Copyright © 2018. All rights reserved.