public class Printer extends Object
IndentPrinter supports indentation and line wrapping by
extending this class.| Constructor and Description |
|---|
Printer(Writer writer,
OutputFormat format) |
| Modifier and Type | Method and Description |
|---|---|
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() |
public Printer(Writer writer, OutputFormat format)
public IOException getException()
public void enterDTD()
throws IOException
leaveDTD().IOExceptionpublic String leaveDTD() throws IOException
IOExceptionpublic void printText(String text) throws IOException
IOExceptionpublic void printText(StringBuffer text) throws IOException
IOExceptionpublic void printText(char[] chars,
int start,
int length)
throws IOException
IOExceptionpublic void printText(char ch)
throws IOException
IOExceptionpublic void printSpace()
throws IOException
IOExceptionpublic void breakLine()
throws IOException
IOExceptionpublic void breakLine(boolean preserveSpace)
throws IOException
IOExceptionpublic void flushLine(boolean preserveSpace)
throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic void indent()
public void unindent()
public int getNextIndent()
public void setNextIndent(int indent)
public void setThisIndent(int indent)
Copyright © 2010 - 2020 Adobe. All Rights Reserved