Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.editor.print
Class DocumentToHTMLGenerator

java.lang.Object
  extended by oracle.javatools.editor.print.DocumentToHTMLGenerator

public class DocumentToHTMLGenerator
extends java.lang.Object

The DocumentToHTMLGenerator class provides generation of HTML output based on the syntax highlighting of a BasicDocument instance. Clients can specify the options to use for generation by providing an HTMLGeneratorOptions instance.


Constructor Summary
DocumentToHTMLGenerator(BasicDocument document, java.lang.String filepath)
          Construct a new DocumentToHTMLGenerator for the given document instance.
 
Method Summary
 void generateHTML(java.io.OutputStream outputStream, HTMLGeneratorOptions options)
          Generates HTML output for the document specified for this generator.
 void generateHTML(java.io.Writer writer, HTMLGeneratorOptions options)
          Generates HTML output for the document specified for this generator.
 void setStyleRegistry(StyleRegistry registry)
          Sets the style registry to use for generation (vs.
 void setTabSize(int tabSize)
          Configure the tab size to use for generation (vs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentToHTMLGenerator

public DocumentToHTMLGenerator(BasicDocument document,
                               java.lang.String filepath)
Construct a new DocumentToHTMLGenerator for the given document instance. The filepath is used only for display in the file header included at the top of the HTML body section.

Parameters:
document - the document to generate HTML output for
filepath - the filepath of the document, to include in the file header at the top of the HTML body.
Method Detail

setStyleRegistry

public void setStyleRegistry(StyleRegistry registry)
Sets the style registry to use for generation (vs. defaulting to the EditorProperties configured settings.)

Parameters:
registry - the style registry to use

setTabSize

public void setTabSize(int tabSize)
Configure the tab size to use for generation (vs. defaulting to the EditorProperties configured settings.)

Parameters:
tabSize - the tab size to use for generation

generateHTML

public void generateHTML(java.io.OutputStream outputStream,
                         HTMLGeneratorOptions options)
                  throws java.io.UnsupportedEncodingException,
                         java.io.IOException
Generates HTML output for the document specified for this generator. The specified options will be used to control the HTML generation. If the charset specified by the options is invalid, an UnsupportedEncodingException may be generated.

Parameters:
outputStream - the output stream to use
options - the options to use for generation
Throws:
java.io.UnsupportedEncodingException - if the encoding is unknown
java.io.IOException - if an error occurs while generating the output

generateHTML

public void generateHTML(java.io.Writer writer,
                         HTMLGeneratorOptions options)
                  throws java.io.IOException
Generates HTML output for the document specified for this generator. The specified options will be used to control the HTML generation.

Parameters:
writer - the writer to use
options - the options to use for generation
Throws:
java.io.IOException - if an error occurs while generating the output

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.