HTMLWriter
Class HTMLWriter

java.lang.Object
  |
  +--HTMLWriter.HTMLWriter

public class HTMLWriter
extends java.lang.Object

HTML Writer This class can be used to handle output to a browser.

Version:
1.0
Author:
Ari Turetzky

Constructor Summary
HTMLWriter(HTMLWriter.HttpServletResponse res)
          Constructor takes an HTTPServletResponse object to handle the output
 
Method Summary
 void Footer()
          Closes the BODY and HTML tags
 void Header(java.lang.String title)
          Creates the leading HTML Tag and the title.
 void Heading(int level, java.lang.String strText)
          Creates an H tag at the specified level
 void PrintText(java.lang.String strText)
          Prints the text to the html page preceeded and followed by a P tag
 void ResultSetToTable(java.sql.ResultSet rs)
          Takes a result set and writes a table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLWriter

public HTMLWriter(HTMLWriter.HttpServletResponse res)
           throws java.io.IOException
Constructor takes an HTTPServletResponse object to handle the output
Parameters:
res - a HttpServletResponse value
Throws:
java.io.IOException - if an error occurs
Method Detail

Header

public void Header(java.lang.String title)
Creates the leading HTML Tag and the title. Also opens the BODY tag.
Parameters:
title - the text of the title

Footer

public void Footer()
Closes the BODY and HTML tags

Heading

public void Heading(int level,
                    java.lang.String strText)
Creates an H tag at the specified level
Parameters:
level - the heading level 1-6
strText - the text of the heading

PrintText

public void PrintText(java.lang.String strText)
Prints the text to the html page preceeded and followed by a P tag
Parameters:
strText - a String value

ResultSetToTable

public void ResultSetToTable(java.sql.ResultSet rs)
                      throws java.sql.SQLException
Takes a result set and writes a table
Parameters:
rs - a rs that contains the data for the table