|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.rat.report.xml.writer.impl.base.XmlWriter
public final class XmlWriter
Lightweight IXmlWriter implementation.
Requires a wrapper to be used safely in a multithreaded environment.
Not intended to be subclassed. Please copy and hack!
| Constructor Summary | |
|---|---|
XmlWriter(java.io.Writer writer)
|
|
| Method Summary | |
|---|---|
IXmlWriter |
attribute(java.lang.CharSequence name,
java.lang.CharSequence value)
Writes an attribute of an element. |
IXmlWriter |
closeDocument()
Closes all pending elements. |
IXmlWriter |
closeElement()
Closes the last element written. |
IXmlWriter |
content(java.lang.CharSequence content)
Writes content. |
IXmlWriter |
openElement(java.lang.CharSequence elementName)
Writes the start of an element. |
IXmlWriter |
startDocument()
Starts a document by writing a prolog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlWriter(java.io.Writer writer)
| Method Detail |
|---|
public IXmlWriter startDocument()
throws java.io.IOException
startDocument in interface IXmlWriterOperationNotAllowedException - if called after the first element has been written
or once a prolog has already been written
java.io.IOException
public IXmlWriter openElement(java.lang.CharSequence elementName)
throws java.io.IOException
openElement in interface IXmlWriterelementName - the name of the element, not null
InvalidXmlException - if the name is not valid for an xml element
OperationNotAllowedException - if called after the first element has been closed
java.io.IOException
public IXmlWriter attribute(java.lang.CharSequence name,
java.lang.CharSequence value)
throws java.io.IOException
openElement(CharSequence)
or attribute(java.lang.CharSequence, java.lang.CharSequence).
attribute in interface IXmlWritername - the attribute name, not nullvalue - the attribute value, not null
InvalidXmlException - if the name is not valid for an xml attribute
or if a value for the attribute has already been written
OperationNotAllowedException - if called after content(CharSequence)
or closeElement() or before any call to openElement(CharSequence)
java.io.IOException
public IXmlWriter content(java.lang.CharSequence content)
throws java.io.IOException
content in interface IXmlWritercontent - the content to write
OperationNotAllowedException - if called before any call to openElement(java.lang.CharSequence)
or after the first element has been closed
java.io.IOException
public IXmlWriter closeElement()
throws java.io.IOException
closeElement in interface IXmlWriterOperationNotAllowedException - if called before any call to openElement(java.lang.CharSequence)
or after the first element has been closed
java.io.IOException
public IXmlWriter closeDocument()
throws java.io.IOException
closeDocument in interface IXmlWriterOperationNotAllowedException - if called before any call to openElement(java.lang.CharSequence)
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||