public abstract class OutputSerializer extends Serializer
Modifier and Type | Field and Description |
---|---|
protected byte[] |
itemsep
Item separator.
|
protected PrintOutput |
out
Output stream.
|
protected SerializerOptions |
sopts
Serializer options.
|
Modifier | Constructor and Description |
---|---|
protected |
OutputSerializer(PrintOutput out,
SerializerOptions sopts)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the serializer.
|
boolean |
finished()
Tests if the serialization was interrupted.
|
protected void |
indent()
Indents the next text.
|
protected void |
itemsep(byte[] def)
Sets the item separator.
|
protected void |
newline()
Prints a newline.
|
void |
reset()
Resets the serializer (indentation, etc).
|
atomic, attribute, closeDoc, closeElement, comment, finishClose, finishEmpty, finishOpen, function, get, get, ignore, namespace, node, nsUri, openDoc, openElement, pi, serialize, startOpen, text
protected final PrintOutput out
protected final SerializerOptions sopts
protected byte[] itemsep
protected OutputSerializer(PrintOutput out, SerializerOptions sopts)
out
- print outputsopts
- serializer optionspublic void reset()
Serializer
reset
in class Serializer
public final boolean finished()
Serializer
finished
in class Serializer
public void close() throws IOException
Serializer
close
in interface Closeable
close
in interface AutoCloseable
close
in class Serializer
IOException
- I/O exceptionprotected void indent() throws IOException
IOException
- I/O exceptionprotected final void newline() throws IOException
IOException
- I/O exceptionprotected final void itemsep(byte[] def)
def
- default separatorCopyright © 2005–2015 BaseX Team. All rights reserved.