org.activemath.util
Class PrettyUTF8XMLWriter
java.lang.Object
java.io.Writer
org.activemath.util.MyUTF8XMLWriter
org.activemath.util.ProtectedUTF8XMLWriter
org.activemath.util.PrettyUTF8XMLWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public class PrettyUTF8XMLWriter
- extends ProtectedUTF8XMLWriter
A class to write indented XML documents.
|
Field Summary |
int |
level
The current nesting level |
int |
numSpaces
The number of spaces per indentation. |
| Methods inherited from class org.activemath.util.MyUTF8XMLWriter |
cdataSection, characterReference, close, comment, endAttribute, endReplacementText, entityReference, flush, processingInstruction, startAttribute, startReplacementText, write, write, write, write, writeRaw, writeUTF8 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
level
public int level
- The current nesting level
numSpaces
public final int numSpaces
- The number of spaces per indentation.
- See Also:
- Constant Field Values
PrettyUTF8XMLWriter
public PrettyUTF8XMLWriter(OutputStream s)
attribute
public void attribute(String name,
String content)
throws IOException
- Overrides:
attribute in class ProtectedUTF8XMLWriter
- Throws:
IOException
startElement
public void startElement(String el)
throws IOException
- Overrides:
startElement in class MyUTF8XMLWriter
- Throws:
IOException
endElement
public void endElement(String el)
throws IOException
- Overrides:
endElement in class MyUTF8XMLWriter
- Throws:
IOException
newLine
public void newLine()
throws IOException
- Description copied from class:
MyUTF8XMLWriter
- Adds up a newLine as defined by the lineSeparator variable.
This method is also called by any newLine printing as all newLines transmitted
are escaped (at least the escaped ones).
- Overrides:
newLine in class MyUTF8XMLWriter
- Throws:
IOException
indentSpace
public String indentSpace()