public class Printer
extends java.lang.Object
IndentPrinter
supports indentation and line wrapping by
extending this class.Modifier and Type | Field and Description |
---|---|
protected java.io.Writer |
_docWriter
Deprecated.
Holds a reference to the document writer while we are
in DTD mode.
|
protected java.io.StringWriter |
_dtdWriter
Deprecated.
The DTD writer.
|
protected java.io.IOException |
_exception
Deprecated.
Holds the exception thrown by the serializer.
|
protected OutputFormat |
_format
Deprecated.
The output format associated with this serializer.
|
protected java.io.Writer |
_writer
Deprecated.
The writer to which the document is written.
|
Constructor and Description |
---|
Printer(java.io.Writer writer,
OutputFormat format)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
breakLine()
Deprecated.
|
void |
breakLine(boolean preserveSpace)
Deprecated.
|
void |
enterDTD()
Deprecated.
Called by any of the DTD handlers to enter DTD mode.
|
void |
flush()
Deprecated.
Flush the output stream.
|
void |
flushLine(boolean preserveSpace)
Deprecated.
|
java.io.IOException |
getException()
Deprecated.
|
int |
getNextIndent()
Deprecated.
|
void |
indent()
Deprecated.
|
java.lang.String |
leaveDTD()
Deprecated.
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()
Deprecated.
|
void |
printText(char ch)
Deprecated.
|
void |
printText(char[] chars,
int start,
int length)
Deprecated.
|
void |
printText(java.lang.String text)
Deprecated.
|
void |
printText(java.lang.StringBuffer text)
Deprecated.
|
void |
setNextIndent(int indent)
Deprecated.
|
void |
setThisIndent(int indent)
Deprecated.
|
void |
unindent()
Deprecated.
|
protected final OutputFormat _format
protected java.io.Writer _writer
protected java.io.StringWriter _dtdWriter
protected java.io.Writer _docWriter
protected java.io.IOException _exception
public Printer(java.io.Writer writer, OutputFormat format)
public java.io.IOException getException()
public void enterDTD() throws java.io.IOException
leaveDTD()
.java.io.IOException
public java.lang.String leaveDTD() throws java.io.IOException
java.io.IOException
public void printText(java.lang.String text) throws java.io.IOException
java.io.IOException
public void printText(java.lang.StringBuffer text) throws java.io.IOException
java.io.IOException
public void printText(char[] chars, int start, int length) throws java.io.IOException
java.io.IOException
public void printText(char ch) throws java.io.IOException
java.io.IOException
public void printSpace() throws java.io.IOException
java.io.IOException
public void breakLine() throws java.io.IOException
java.io.IOException
public void breakLine(boolean preserveSpace) throws java.io.IOException
java.io.IOException
public void flushLine(boolean preserveSpace) throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public void indent()
public void unindent()
public int getNextIndent()
public void setNextIndent(int indent)
public void setThisIndent(int indent)
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.