java.lang.Object | ||
↳ | com.thoughtworks.xstream.io.WriterWrapper | |
↳ | com.thoughtworks.xstream.io.StatefulWriter |
An wrapper for all HierarchicalStreamWriter
implementations, that keeps the state.
Writing in a wrong state will throw a StreamException
, that wraps either an
IOException (writing to a closed writer) or an IllegalStateException. The
implementation will also track unbalanced nodes or multiple attributes with the same name.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
STATE_CLOSED | STATE_CLOSED is the state if the writer has been closed. |
||||||||||
STATE_NODE_END | STATE_NODE_END is the state if a node has ended |
||||||||||
STATE_NODE_START | STATE_NODE_START is the state of a new node has been started. |
||||||||||
STATE_OPEN | STATE_OPEN is the initial value of the writer. |
||||||||||
STATE_VALUE | STATE_VALUE is the state if the value of a node has been written. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.thoughtworks.xstream.io.WriterWrapper
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a StatefulWriter.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Close the writer, if necessary.
| |||||||||||
Flush the writer, if necessary.
| |||||||||||
Write the value (text content) of the current node.
| |||||||||||
Retrieve the state of the writer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.thoughtworks.xstream.io.WriterWrapper
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriter
| |||||||||||
From interface
com.thoughtworks.xstream.io.HierarchicalStreamWriter
|
STATE_CLOSED
is the state if the writer has been closed.
STATE_NODE_END
is the state if a node has ended
STATE_NODE_START
is the state of a new node has been started.
STATE_OPEN
is the initial value of the writer.
STATE_VALUE
is the state if the value of a node has been written.
Constructs a StatefulWriter.
wrapped | the wrapped writer |
---|
Close the writer, if necessary.
Flush the writer, if necessary.
Retrieve the state of the writer.