Xerces 3.1.1 API: Class Printer
|
Xerces 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xml.serialize.Printer
The printer is responsible for sending text to the output stream
or writer. This class performs direct writing for efficiency.
IndentPrinter
supports indentation and line wrapping by
extending this class.
Field Summary | |
protected java.io.Writer |
_docWriter
Holds a reference to the document writer while we are in DTD mode. |
protected java.io.StringWriter |
_dtdWriter
The DTD writer. |
protected java.io.IOException |
_exception
Holds the exception thrown by the serializer. |
protected OutputFormat |
_format
The output format associated with this serializer. |
protected java.io.Writer |
_writer
The writer to which the document is written. |
Constructor Summary | |
Printer(java.io.Writer writer,
OutputFormat format)
|
Method Summary | |
void |
breakLine()
|
void |
breakLine(boolean preserveSpace)
|
void |
enterDTD()
Called by any of the DTD handlers to enter DTD mode. |
void |
flush()
Flush the output stream. |
void |
flushLine(boolean preserveSpace)
|
java.io.IOException |
getException()
|
int |
getNextIndent()
|
void |
indent()
|
java.lang.String |
leaveDTD()
Called by the root element to leave DTD mode and if any DTD parts were printer, will return a string with their textual content. |
void |
printSpace()
|
void |
printText(char ch)
|
void |
printText(char[] chars,
int start,
int length)
|
void |
printText(java.lang.String text)
|
void |
printText(java.lang.StringBuffer text)
|
void |
setNextIndent(int indent)
|
void |
setThisIndent(int indent)
|
void |
unindent()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected final OutputFormat _format
protected java.io.Writer _writer
protected java.io.StringWriter _dtdWriter
protected java.io.Writer _docWriter
protected java.io.IOException _exception
Constructor Detail |
public Printer(java.io.Writer writer, OutputFormat format)
Method Detail |
public java.io.IOException getException()
public void enterDTD()
leaveDTD()
.public java.lang.String leaveDTD()
public void printText(java.lang.String text)
public void printText(java.lang.StringBuffer text)
public void printText(char[] chars, int start, int length)
public void printText(char ch)
public void printSpace()
public void breakLine()
public void breakLine(boolean preserveSpace)
public void flushLine(boolean preserveSpace)
public void flush()
public void indent()
public void unindent()
public int getNextIndent()
public void setNextIndent(int indent)
public void setThisIndent(int indent)
|
Xerces 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |