|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.xml.impl.XmlWriter
XML document writer, default implementation.
XmlReader
Field Summary | |
protected char |
m_lastCh
Last character written to the underlying output stream. |
protected java.io.BufferedWriter |
m_out
Underlying output stream. |
Constructor Summary | |
XmlWriter(java.io.OutputStream out)
Constructor. |
|
XmlWriter(java.io.Writer out)
Constructor. |
Method Summary | |
void |
writeAttribute(XmlAttributeI ent)
Write an XML element attribute to this XML output stream. |
void |
writeComment(java.lang.String text)
Write a comment to this XML output stream. |
void |
writeElement(XmlElementI ent)
Write an XML tagged element to this XML output stream. |
void |
writeText(java.lang.String text)
Write the text contents of the current XML element to this XML output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.BufferedWriter m_out
protected char m_lastCh
Constructor Detail |
public XmlWriter(java.io.Writer out)
out
- Underlying output stream.
It is assumed that this stream writes character data in UTF-8 encoding.
For efficiency, this is internally wrapped with a java.io.BufferedWriter, unless it is already such an object.
public XmlWriter(java.io.OutputStream out)
out
- Underlying output stream.
Characters are written to this stream in UTF-8 encoding.Method Detail |
public void writeElement(XmlElementI ent) throws java.io.IOException
writeElement
in interface XmlWriterI
ent
- An XML tagged element.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing.public void writeAttribute(XmlAttributeI ent) throws java.io.IOException
writeAttribute
in interface XmlWriterI
ent
- An XML element attribute.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing.public void writeText(java.lang.String text) throws java.io.IOException
writeText
in interface XmlWriterI
text
- Text contents of the current XML element.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing.public void writeComment(java.lang.String text) throws java.io.IOException
writeComment
in interface XmlWriterI
text
- Comment text.
java.io.IOException
- Thrown if an I/O (write) error occurs.
java.lang.IllegalStateException
- (unchecked)
Thrown if this writer is not in the proper state for writing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |