Package com.sun.javatest.report
Class HTMLWriterEx
java.lang.Object
com.sun.javatest.util.HTMLWriter
com.sun.javatest.report.HTMLWriterEx
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:
-
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
ConstructorsConstructorDescriptionHTMLWriterEx
(Writer out) Create an HTMLWriterEx object, using a default doctype for HTML 3.2.HTMLWriterEx
(Writer out, I18NResourceBundle i18n) Create an HTMLWriterEx object, using a specified bundle for localizing messages.HTMLWriterEx
(Writer out, String docType) Create an HTMLWriterEx object, using a specified doctype header.HTMLWriterEx
(Writer out, String docType, I18NResourceBundle i18n) Create an HTMLWriterEx object, using a specified doctype header and using a specified bundle for localizing messages. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Write Content-Type meta tag using default charset: This must go inside the <head> element!void
writeContentMeta
(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 Details
-
HTMLWriterEx
Create an HTMLWriterEx object, using a default doctype for HTML 3.2.- Parameters:
out
- a Writer to which to write the generated HTML- Throws:
IOException
- if there is a problem writing to the underlying stream
-
HTMLWriterEx
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:
IOException
- if there is a problem writing to the underlying stream
-
HTMLWriterEx
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:
IOException
- if there is a problem writing to the underlying stream
-
HTMLWriterEx
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:
IOException
- if there is a problem writing to the underlying stream
-
-
Method Details
-
writeContentMeta
Write Content-Type meta tag using default charset: This must go inside the <head> element!- Throws:
IOException
-
writeContentMeta
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:
IOException
-