Class w3c.jigsaw.html.HtmlGenerator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.html.HtmlGenerator

java.lang.Object
   |
   +----w3c.jigsaw.html.HtmlGenerator

public class HtmlGenerator
extends Object
A simple HTML generator. This class implements an HTML generator that allows to output dynamic HTML content out.

Constructor Index

 o HtmlGenerator(String)

Method Index

 o append(String)
Append the given string to the document body.
 o append(String, String)
Append the two strings to the document body.
 o append(String, String, String)
 o appendAndEscape(String)
Append the given string, escaping all special characters.
 o close()
Close the given document: its composition is now finished.
 o emitBODYTag(boolean)
Don't emit body tag.
 o getInputStream()
Get the input string for reading the document.
 o getMimeType()
Get this stream MIME type.
 o length()
Get the length of this html document
 o meta(String, String)

Constructors

 o HtmlGenerator
  public HtmlGenerator(String title)

Methods

 o getMimeType
  public MimeType getMimeType()
Get this stream MIME type. This defaults to text/html.
 o emitBODYTag
  public void emitBODYTag(boolean value)
Don't emit body tag. This is usefull in conjunction with the FRAMESET tag, that requires that no BODY tag be emited.
Parameters:
value - If true, a BODY tag will be emited.
 o appendAndEscape
  public void appendAndEscape(String content)
Append the given string, escaping all special characters. This can be used only if you know that the string you are inserting doesn't contain HTML tags
 o append
  public void append(String content)
Append the given string to the document body.
Parameters:
The - HTML string to append.
 o append
  public void append(String str1,
                     String str2)
Append the two strings to the document body. append("x"+"y"); is equivalent but slower than append("x", "y");.
Parameters:
str1 - The first string.
str2 - The second string.
 o append
  public void append(String s1,
                     String s2,
                     String s3)
 o length
  public int length()
Get the length of this html document
Returns:
the length in bytes of the document
 o close
  public void close()
Close the given document: its composition is now finished.
Returns:
The content length for this document.
 o meta
  public void meta(String name,
                   String value)
 o getInputStream
  public InputStream getInputStream()
Get the input string for reading the document.
Returns:
An input stream to get the generated document from.

All Packages  Class Hierarchy  This Package  Previous  Next  Index