org.jacoco.report.xml
Class XMLDocument

java.lang.Object
  extended by org.jacoco.report.xml.XMLElement
      extended by org.jacoco.report.xml.XMLDocument
Direct Known Subclasses:
HTMLDocument, XMLReportFile

public class XMLDocument
extends XMLElement

Root element of an XML document. Each instance represents a separate output document.

Version:
$Revision: $
Author:
Marc R. Hoffmann
See Also:
XMLElement

Field Summary
 
Fields inherited from class org.jacoco.report.xml.XMLElement
writer
 
Constructor Summary
XMLDocument(String rootnode, String pubId, String system, String encoding, boolean standalone, OutputStream output)
          Writes a new document to the given binary stream.
XMLDocument(String rootnode, String pubId, String system, String encoding, boolean standalone, Writer writer)
          Writes a new document to the given writer.
 
Method Summary
 void close()
          Closes this element if it has not been closed before.
 
Methods inherited from class org.jacoco.report.xml.XMLElement
addChildElement, attr, beginOpenTag, element, text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDocument

public XMLDocument(String rootnode,
                   String pubId,
                   String system,
                   String encoding,
                   boolean standalone,
                   Writer writer)
            throws IOException
Writes a new document to the given writer. The document might contain a document type declaration.

Parameters:
rootnode - name of the root node
pubId - optional doctype identifier or null
system - system reference, required if doctype is given
encoding - encoding that will be specified in the header
standalone - true if this is a standalone document
writer - writer for content output
Throws:
IOException - in case of problems with the writer

XMLDocument

public XMLDocument(String rootnode,
                   String pubId,
                   String system,
                   String encoding,
                   boolean standalone,
                   OutputStream output)
            throws IOException
Writes a new document to the given binary stream. The document might contain a document type declaration.

Parameters:
rootnode - name of the root node
pubId - optional doctype identifier or null
system - system reference, required if doctype is given
encoding - encoding of the XML document
standalone - true if this is a standalone document
output - output for content output
Throws:
IOException - in case of problems with the writer
Method Detail

close

public void close()
           throws IOException
Description copied from class: XMLElement
Closes this element if it has not been closed before.

Overrides:
close in class XMLElement
Throws:
IOException - in case of problems with the writer