|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.system.configuration.Printer
public class 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 Writer |
docWriter
Holds a reference to the document writer while we are in DTD mode. |
protected StringWriter |
dtdWriter
The DTD writer. |
protected IOException |
exception
Holds the exception thrown by the serializer. |
protected OutputFormat |
format
The output format associated with this serializer. |
protected Writer |
writer
The writer to which the document is written. |
Constructor Summary | |
---|---|
Printer(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)
|
IOException |
getException()
|
int |
getNextIndent()
|
void |
indent()
|
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(String text)
|
void |
printText(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 Writer writer
protected StringWriter dtdWriter
protected Writer docWriter
protected IOException exception
Constructor Detail |
---|
public Printer(Writer writer, OutputFormat format)
Method Detail |
---|
public IOException getException()
public void enterDTD() throws IOException
leaveDTD()
.
IOException
public String leaveDTD() throws IOException
IOException
public void printText(String text) throws IOException
IOException
public void printText(StringBuffer text) throws IOException
IOException
public void printText(char[] chars, int start, int length) throws IOException
IOException
public void printText(char ch) throws IOException
IOException
public void printSpace() throws IOException
IOException
public void breakLine() throws IOException
IOException
public void breakLine(boolean preserveSpace) throws IOException
IOException
public void flushLine(boolean preserveSpace) throws IOException
IOException
public void flush() throws IOException
IOException
public void indent()
public void unindent()
public int getNextIndent()
public void setNextIndent(int indent)
public void setThisIndent(int indent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |