net.sf.colorer.viewer
Class HTMLGenerator
java.lang.Object
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
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 |
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 resourcesinput
- LineSource input object, representing input source text, used for parsinghrd
- Name of a color scheme, used to highlight text and transform it into HTML form
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 dataescapedWriter
- 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 parseruseLineNumbers
- If true, number of each line is printed before actual text datauseHtmlSubst
- If true, & and < HTML symbols have to be substituted in outputuseInfoHeader
- If true, simple informational header is printed before actual source textuseHeaderFooter
- If true, standard HTML tags with header/footer are printed
- Throws:
java.io.IOException
Copyright © 2003 Cail Lomecb. All Rights Reserved.