org.jacoco.report.html
Class HTMLDocument

java.lang.Object
  extended by org.jacoco.report.xml.XMLElement
      extended by org.jacoco.report.xml.XMLDocument
          extended by org.jacoco.report.html.HTMLDocument

public class HTMLDocument
extends XMLDocument

XMLDocument that declares its content type to be XHTML 1.0 Strict and produces HTMLElements as children.

Version:
$Revision: $
Author:
Marc R. Hoffmann

Field Summary
 
Fields inherited from class org.jacoco.report.xml.XMLElement
writer
 
Constructor Summary
HTMLDocument(OutputStream output, String encoding)
          Creates a new HTML document based on the given stream.
HTMLDocument(Writer writer, String encoding)
          Creates a new HTML document based on the given writer.
 
Method Summary
 HTMLElement body()
          Creates a 'body' element.
 HTMLElement element(String name)
          Creates a new child element for this element,
 HTMLElement head()
          Creates a 'head' element.
 
Methods inherited from class org.jacoco.report.xml.XMLDocument
close
 
Methods inherited from class org.jacoco.report.xml.XMLElement
addChildElement, attr, beginOpenTag, text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLDocument

public HTMLDocument(Writer writer,
                    String encoding)
             throws IOException
Creates a new HTML document based on the given writer.

Parameters:
writer - writer for content output
encoding - document encoding
Throws:
IOException - in case of problems with the writer

HTMLDocument

public HTMLDocument(OutputStream output,
                    String encoding)
             throws IOException
Creates a new HTML document based on the given stream.

Parameters:
output - stream for content output
encoding - document encoding
Throws:
IOException - in case of problems with the stream
Method Detail

element

public HTMLElement element(String name)
                    throws IOException
Description copied from class: XMLElement
Creates a new child element for this element,

Overrides:
element in class XMLElement
Parameters:
name - name of the child element
Returns:
child element instance
Throws:
IOException - in case of problems with the writer

head

public HTMLElement head()
                 throws IOException
Creates a 'head' element.

Returns:
'head' element
Throws:
IOException - in case of problems with the writer

body

public HTMLElement body()
                 throws IOException
Creates a 'body' element.

Returns:
'body' element
Throws:
IOException - in case of problems with the writer