
public class TextWriterStream extends Object
| Modifier and Type | Field and Description | 
|---|---|
| private StringBuilder | commentBuffer for comment data to output. | 
| static String | COMMENTSEPComment separator line. | 
| private boolean | forceincommentsForce incomments flag | 
| private StringBuilder | inlineBuffer for inline data to output. | 
| private static String | NEWLINESystem newline character(s) | 
| private PrintStream | outStreamActual stream to write to. | 
| static String | QUOTEString to separate different entries while printing. | 
| static String | SEPARATORString to separate different entries while printing. | 
| static String | SER_MARKERMarker used in text serialization (and re-parsing) | 
| private HandlerList<TextWriterWriterInterface<?>> | writersHandlers for various object types. | 
| Constructor and Description | 
|---|
| TextWriterStream(PrintStream out,
                HandlerList<TextWriterWriterInterface<?>> writers)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | commentPrint(Object line)Print an object into the comments section | 
| void | commentPrintLn()Print a newline into the comments section. | 
| void | commentPrintLn(Object line)Print an object into the comments section with trailing newline. | 
| void | commentPrintSeparator()Print a separator line in the comments section. | 
| void | flush()Flush output:
 write inline data, then write comment section. | 
| TextWriterWriterInterface<?> | getWriterFor(Object o)Retrieve an appropriate writer from the handler list. | 
| void | inlinePrint(Object o)Print data into the inline part of the file. | 
| void | inlinePrintNoQuotes(Object o)Print data into the inline part of the file WITHOUT checking for
 separators (and thus quoting). | 
| protected boolean | isForceincomments()Test force-in-comments flag. | 
| <O> O | normalizationRestore(O v)Restore a vector undoing any normalization that was applied. | 
| private void | quotePrintln(PrintStream outStream,
            String data)Quoted println. | 
| protected void | setForceincomments(boolean forceincomments)Set the force-in-comments flag. | 
private PrintStream outStream
private StringBuilder inline
private StringBuilder comment
private HandlerList<TextWriterWriterInterface<?>> writers
public static final String SEPARATOR
public static final String QUOTE
public static final String COMMENTSEP
QUOTE infront, it should be quoted string itself.private static final String NEWLINE
public static final String SER_MARKER
private boolean forceincomments
public TextWriterStream(PrintStream out, HandlerList<TextWriterWriterInterface<?>> writers)
out - Actual stream to write towriters - Handlers for various data typespublic void commentPrint(Object line)
line - object to print into commmentspublic void commentPrintLn(Object line)
line - object to print into commentspublic void commentPrintLn()
public void commentPrintSeparator()
public void inlinePrint(Object o)
o - object to printpublic void inlinePrintNoQuotes(Object o)
o - object to print.public void flush()
private void quotePrintln(PrintStream outStream, String data)
QUOTEoutStream - output stream to write todata - data to printpublic TextWriterWriterInterface<?> getWriterFor(Object o)
o - query objectpublic <O> O normalizationRestore(O v)
O - Object classv - vector to restoreprotected boolean isForceincomments()
protected void setForceincomments(boolean forceincomments)
forceincomments - the new flag value