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.
 

Method Detail

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 serialized
logger - a logger used for logging messages
fileName - a name used as a template for the name of the output file
extension - an extension for the output file
preserveSpace - if true, the preserve space mode is used
indent - if true, the output will be indented
lineWidth - a necessary width of output lines (0 means no text wrapping)


Other Novosoft LLC products:
Handy Backup Handy Password manager