|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.apache.xml.serialize.Printer
|
+--org.apache.xml.serialize.IndentPrinter
Extends Printer and adds support for indentation and line
wrapping.
| Fields inherited from class org.apache.xml.serialize.Printer |
_docWriter, _dtdWriter, _exception, _format, _writer |
| Constructor Summary | |
IndentPrinter(java.io.Writer writer,
OutputFormat format)
|
|
| Method Summary | |
void |
breakLine()
Called to print a line consisting of the text accumulated so far. |
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)
Flushes the line accumulated so far to the writer and get ready to accumulate the next line. |
int |
getNextIndent()
|
void |
indent()
Increment the indentation for the next line. |
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()
Called to print a single space between text parts that may be broken into separate lines. |
void |
printText(char ch)
|
void |
printText(char[] chars,
int start,
int length)
|
void |
printText(java.lang.String text)
Called to print additional text. |
void |
printText(java.lang.StringBuffer text)
|
void |
setNextIndent(int indent)
|
void |
setThisIndent(int indent)
|
void |
unindent()
Decrement the indentation for the next line. |
| Methods inherited from class org.apache.xml.serialize.Printer |
getException |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IndentPrinter(java.io.Writer writer,
OutputFormat format)
| Method Detail |
public void enterDTD()
leaveDTD().enterDTD in class Printerpublic java.lang.String leaveDTD()
leaveDTD in class Printerpublic void printText(java.lang.String text)
printSpace()) all the accumulated text becomes one part and is
added to the accumulate line. When a line is long enough, it can
be broken at its text boundary.printText in class Printertext - The text to printpublic void printText(java.lang.StringBuffer text)
printText in class Printerpublic void printText(char ch)
printText in class Printer
public void printText(char[] chars,
int start,
int length)
printText in class Printerpublic void printSpace()
printText(java.lang.String) will be added to the accumulated line, and a space
separator will be counted. If the line accumulated so far is
long enough, it will be printed.printSpace in class Printerpublic void breakLine()
printSpace() but
forcing the line to print and starting a new line (printSpace() will only start a new line if the current line
is long enough).breakLine in class Printerpublic void breakLine(boolean preserveSpace)
breakLine in class Printerpublic void flushLine(boolean preserveSpace)
printText(java.lang.String) and printSpace() when the accumulated line plus
accumulated text are two long to fit on a given line. At the end of
this method _line is empty and _spaces is zero.flushLine in class Printerpublic void flush()
flush in class Printerpublic void indent()
indent in class Printerpublic void unindent()
unindent in class Printerpublic int getNextIndent()
getNextIndent in class Printerpublic void setNextIndent(int indent)
setNextIndent in class Printerpublic void setThisIndent(int indent)
setThisIndent in class Printer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||