ru.novosoft.dc.core
Interface ConversionHandler
- All Known Implementing Classes:
- NSDCHandler
- public interface ConversionHandler
The interface provides methods for handling a document conversion.
Method Summary |
org.w3c.dom.DOMImplementation |
getDOMImplementation()
Return an implementation of Document Object Model. |
void |
serialize(org.w3c.dom.Document document,
CommonLogger logger,
java.lang.String fileName,
java.lang.String extension,
boolean preserveSpace,
boolean indent,
int lineWidth)
Serialize the document to a file constructing its name from the
fileName parameter and the specified extension. |
java.io.InputStream |
start(java.lang.String source,
CommonLogger logger)
Open a source file for reading, log a message on starting conversion,
and return the input stream opened. |
start
public java.io.InputStream start(java.lang.String source,
CommonLogger logger)
- Open a source file for reading, log a message on starting conversion,
and return the input stream opened. If the source file is not found,
an error message is logged and the
NSDCException
is thrown.
getDOMImplementation
public org.w3c.dom.DOMImplementation getDOMImplementation()
- Return an implementation of Document Object Model.
serialize
public void serialize(org.w3c.dom.Document document,
CommonLogger logger,
java.lang.String fileName,
java.lang.String extension,
boolean preserveSpace,
boolean indent,
int lineWidth)
- Serialize the document to a file constructing its name from the
fileName parameter and the specified extension. If serialization fails, the
NSDCException
is thrown.
- Parameters:
document
- a document to be serializedlogger
- a logger used for logging messagesfileName
- a name used as a template for the name of the output fileextension
- an extension for the output filepreserveSpace
- if true, the preserve space mode is usedindent
- if true, the output will be indentedlineWidth
- a necessary width of output lines
(0 means no text wrapping)
Other Novosoft LLC products:
Handy Backup Handy Password manager