net.sf.colorer.viewer
Class HTMLGenerator

java.lang.Object
  extended by net.sf.colorer.viewer.HTMLGenerator

public class HTMLGenerator
extends java.lang.Object

Generates colourised HTML output from input stream, forwards output into output stream.

Author:
irusskih

Constructor Summary
HTMLGenerator(ParserFactory pf, ReaderLineSource input, java.lang.String hrd)
          —onstructor, used to pass initial common parameters of generation process
 
Method Summary
 void generate(java.io.Writer commonWriter, java.io.Writer escapedWriter, java.lang.String fileName, boolean useLineNumbers, boolean useHtmlSubst, boolean useInfoHeader, boolean useHeaderFooter)
          Common method, which generates HTML representation of the full source text and writes it into the passed writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLGenerator

public HTMLGenerator(ParserFactory pf,
                     ReaderLineSource input,
                     java.lang.String hrd)
—onstructor, used to pass initial common parameters of generation process

Parameters:
pf - ParserFactory object, used to obtain all parsing resources
input - LineSource input object, representing input source text, used for parsing
hrd - Name of a color scheme, used to highlight text and transform it into HTML form
Method Detail

generate

public void generate(java.io.Writer commonWriter,
                     java.io.Writer escapedWriter,
                     java.lang.String fileName,
                     boolean useLineNumbers,
                     boolean useHtmlSubst,
                     boolean useInfoHeader,
                     boolean useHeaderFooter)
              throws java.io.IOException
Common method, which generates HTML representation of the full source text and writes it into the passed writer.

Parameters:
commonWriter - Writer, used to write all source text data
escapedWriter - Writer, used to write all the created HTML markup data (can be equals to commonWriter)
fileName - input file's name, used to determine, which HRC type must be used by parser
useLineNumbers - If true, number of each line is printed before actual text data
useHtmlSubst - If true, & and < HTML symbols have to be substituted in output
useInfoHeader - If true, simple informational header is printed before actual source text
useHeaderFooter - If true, standard HTML tags with header/footer are printed
Throws:
java.io.IOException


Copyright © 2003 Cail Lomecb. All Rights Reserved.