Package com.sun.javatest.report
Class HTMLWriterEx
- java.lang.Object
-
- com.sun.javatest.util.HTMLWriter
-
- com.sun.javatest.report.HTMLWriterEx
-
public class HTMLWriterEx extends HTMLWriter
A class to facilitate writing HTML via a stream. Extends HTMLWriter and adds some specific functionality which requires newer than JDK 1.1 API The base class, according to the convention, must be compatible with jdk 1.1 so such functionality was implemented here outside of com.sun.javatest.util- See Also:
HTMLWriter
-
-
Field Summary
-
Fields inherited from class com.sun.javatest.util.HTMLWriter
A, ALIGN, B, BODY, BORDER, BR, CLASSID, CODE, COL, COLOR, FONT, H1, H2, H3, H4, HEAD, HR, HREF, HTML, I, ID, IMAGE, LEFT, LI, LINK, NAME, OBJECT, P, PARAM, REL, RIGHT, ROW, SCOPE, SMALL, SRC, STYLE, SUMMARY, TABLE, TD, TEXT_LEFT, TEXT_RIGHT, TH, TITLE, TOP, TR, TYPE, UL, VALIGN, VALUE
-
-
Constructor Summary
Constructors Constructor Description HTMLWriterEx(java.io.Writer out)
Create an HTMLWriterEx object, using a default doctype for HTML 3.2.HTMLWriterEx(java.io.Writer out, I18NResourceBundle i18n)
Create an HTMLWriterEx object, using a specified bundle for localizing messages.HTMLWriterEx(java.io.Writer out, java.lang.String docType)
Create an HTMLWriterEx object, using a specified doctype header.HTMLWriterEx(java.io.Writer out, java.lang.String docType, I18NResourceBundle i18n)
Create an HTMLWriterEx object, using a specified doctype header and using a specified bundle for localizing messages.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writeContentMeta()
Write Content-Type meta tag using default charset: This must go inside the <head> element!void
writeContentMeta(java.nio.charset.Charset charSet)
Write Content-Type meta tag using given charset: This must go inside the <head> element! The Charset provided should be available on the current runtime.-
Methods inherited from class com.sun.javatest.util.HTMLWriter
close, closePrevTag, endEmptyTag, endTag, flush, getCanonicalURIPath, newLine, setI18NResourceBundle, startTag, write, write, write, write, writeAttr, writeAttr, writeEntity, writeI18N, writeI18N, writeI18N, writeImage, writeImage, writeLangAttr, writeLine, writeLink, writeLink, writeLink, writeLink, writeLinkDestination, writeParam, writeRaw, writeStyleAttr
-
-
-
-
Constructor Detail
-
HTMLWriterEx
public HTMLWriterEx(java.io.Writer out) throws java.io.IOException
Create an HTMLWriterEx object, using a default doctype for HTML 3.2.- Parameters:
out
- a Writer to which to write the generated HTML- Throws:
java.io.IOException
- if there is a problem writing to the underlying stream
-
HTMLWriterEx
public HTMLWriterEx(java.io.Writer out, java.lang.String docType) throws java.io.IOException
Create an HTMLWriterEx object, using a specified doctype header.- Parameters:
out
- a Writer to which to write the generated HTMLdocType
- a string containing a doctype header for the HTML to be generated- Throws:
java.io.IOException
- if there is a problem writing to the underlying stream
-
HTMLWriterEx
public HTMLWriterEx(java.io.Writer out, I18NResourceBundle i18n) throws java.io.IOException
Create an HTMLWriterEx object, using a specified bundle for localizing messages.- Parameters:
out
- a Writer to which to write the generated HTMLi18n
- a resource bundle to use to localize messages- Throws:
java.io.IOException
- if there is a problem writing to the underlying stream
-
HTMLWriterEx
public HTMLWriterEx(java.io.Writer out, java.lang.String docType, I18NResourceBundle i18n) throws java.io.IOException
Create an HTMLWriterEx object, using a specified doctype header and using a specified bundle for localizing messages.- Parameters:
out
- a Writer to which to write the generated HTMLdocType
- a string containing a doctype header for the HTML to be generatedi18n
- a resource bundle to use to localize messages- Throws:
java.io.IOException
- if there is a problem writing to the underlying stream
-
-
Method Detail
-
writeContentMeta
public void writeContentMeta() throws java.io.IOException
Write Content-Type meta tag using default charset: This must go inside the <head> element!- Throws:
java.io.IOException
-
writeContentMeta
public void writeContentMeta(java.nio.charset.Charset charSet) throws java.io.IOException
Write Content-Type meta tag using given charset: This must go inside the <head> element! The Charset provided should be available on the current runtime. If the Charset provided is null, the runtime default charset will be used - by calling the no-param version of this method.- Parameters:
charSet
- Character set to use, must not be null.- Throws:
java.io.IOException
-
-