Class IndentPrinter
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xml.serialize.Printer
-
- org.smooks.engine.delivery.sax.ng.org.apache.xml.serialize.IndentPrinter
-
public class IndentPrinter extends Printer
Deprecated.This class was deprecated in Xerces 2.9.0. It is recommended that new applications use the DOM Level 3 LSSerializer or JAXP's Transformation API for XML (TrAX) for serializing XML. See the Xerces documentation for more information.ExtendsPrinter
and adds support for indentation and line wrapping.- Version:
- $Revision$ $Date$
- Author:
- Assaf Arkin
-
-
Field Summary
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xml.serialize.Printer
_docWriter, _dtdWriter, _exception, _format, _writer
-
-
Constructor Summary
Constructors Constructor Description IndentPrinter(Writer writer, OutputFormat format)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
breakLine()
Deprecated.Called to print a line consisting of the text accumulated so far.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.Flushes the line accumulated so far to the writer and get ready to accumulate the next line.int
getNextIndent()
Deprecated.void
indent()
Deprecated.Increment the indentation for the next line.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.Called to print a single space between text parts that may be broken into separate lines.void
printText(char ch)
Deprecated.void
printText(char[] chars, int start, int length)
Deprecated.void
printText(String text)
Deprecated.Called to print additional text.void
printText(StringBuffer text)
Deprecated.void
setNextIndent(int indent)
Deprecated.void
setThisIndent(int indent)
Deprecated.void
unindent()
Deprecated.Decrement the indentation for the next line.-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xml.serialize.Printer
getException
-
-
-
-
Constructor Detail
-
IndentPrinter
public IndentPrinter(Writer writer, OutputFormat format)
Deprecated.
-
-
Method Detail
-
enterDTD
public void enterDTD()
Deprecated.Called by any of the DTD handlers to enter DTD mode. Once entered, all output will be accumulated in a string that can be printed as part of the document's DTD. This method may be called any number of time but will only have affect the first time it's called. To exist DTD state and get the accumulated DTD, callleaveDTD()
.
-
leaveDTD
public 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.
-
printText
public void printText(String text)
Deprecated.Called to print additional text. Each time this method is called it accumulates more text. When a space is printed (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
public void printText(StringBuffer text)
Deprecated.
-
printText
public void printText(char[] chars, int start, int length)
Deprecated.
-
printSpace
public void printSpace()
Deprecated.Called to print a single space between text parts that may be broken into separate lines. Must not be called to print a space when preserving spaces. The text accumulated so far withprintText(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.- Overrides:
printSpace
in classPrinter
-
breakLine
public void breakLine()
Deprecated.Called to print a line consisting of the text accumulated so far. This is equivalent to callingprintSpace()
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
public void breakLine(boolean preserveSpace)
Deprecated.
-
flushLine
public void flushLine(boolean preserveSpace)
Deprecated.Flushes the line accumulated so far to the writer and get ready to accumulate the next line. This method is called byprintText(java.lang.String)
andprintSpace()
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.
-
flush
public void flush()
Deprecated.Flush the output stream. Must be called when done printing the document, otherwise some text might be buffered.
-
indent
public void indent()
Deprecated.Increment the indentation for the next line.
-
unindent
public void unindent()
Deprecated.Decrement the indentation for the next line.
-
getNextIndent
public int getNextIndent()
Deprecated.- Overrides:
getNextIndent
in classPrinter
-
setNextIndent
public void setNextIndent(int indent)
Deprecated.- Overrides:
setNextIndent
in classPrinter
-
setThisIndent
public void setThisIndent(int indent)
Deprecated.- Overrides:
setThisIndent
in classPrinter
-
-