|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.n3.nanoxml.XMLWriter
public class XMLWriter
An XMLWriter writes XML data to a stream.
XMLElement,
Writer| Field Summary | |
|---|---|
private java.io.PrintWriter |
writer
Where to write the output to. |
| Constructor Summary | |
|---|---|
XMLWriter(java.io.OutputStream stream)
Creates a new XML writer. |
|
XMLWriter(java.io.Writer writer)
Creates a new XML writer. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Cleans up the object when it's destroyed. |
void |
write(XMLElement xml)
Writes an XML element. |
void |
write(XMLElement xml,
boolean prettyPrint)
Writes an XML element. |
void |
write(XMLElement xml,
boolean prettyPrint,
int indent)
Writes an XML element. |
private void |
writeEncoded(java.lang.String str)
Writes a string encoding reserved characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.io.PrintWriter writer
| Constructor Detail |
|---|
public XMLWriter(java.io.Writer writer)
writer - where to write the output to.public XMLWriter(java.io.OutputStream stream)
stream - where to write the output to.| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public void write(XMLElement xml)
throws java.io.IOException
xml - the non-null XML element to write.
java.io.IOException
public void write(XMLElement xml,
boolean prettyPrint)
throws java.io.IOException
xml - the non-null XML element to write.prettyPrint - if spaces need to be inserted to make the output more readable
java.io.IOException
public void write(XMLElement xml,
boolean prettyPrint,
int indent)
throws java.io.IOException
xml - the non-null XML element to write.prettyPrint - if spaces need to be inserted to make the output more readableindent - how many spaces to indent the element.
java.io.IOExceptionprivate void writeEncoded(java.lang.String str)
str - the string to write.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||