Deprecated
as a consequence of WriterWrapper being deprecated. See corresponding docs for further information.
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.
| Modifier and Type | Field and Description |
|---|---|
| private transient FastStack | |
| private transient int | |
| private transient int | |
| public static int | STATE_CLOSED
|
| public static int | STATE_NODE_END
|
| public static int | STATE_NODE_START
|
| public static int | STATE_OPEN
|
| public static int | STATE_VALUE
|
| Access | Constructor and Description |
|---|---|
| public | StatefulWriter(final HierarchicalStreamWriter
the wrapped writer wrapped)Constructs a StatefulWriter. |
| attributes | back to summary |
|---|---|
| private transient FastStack attributes | |
| balance | back to summary |
|---|---|
| private transient int balance | |
| state | back to summary |
|---|---|
| private transient int state | |
| STATE_CLOSED | back to summary |
|---|---|
| public static int STATE_CLOSED
| |
| STATE_NODE_END | back to summary |
|---|---|
| public static int STATE_NODE_END
| |
| STATE_NODE_START | back to summary |
|---|---|
| public static int STATE_NODE_START
| |
| STATE_OPEN | back to summary |
|---|---|
| public static int STATE_OPEN
| |
| STATE_VALUE | back to summary |
|---|---|
| public static int STATE_VALUE
| |
| StatefulWriter | back to summary |
|---|---|
| public StatefulWriter(final HierarchicalStreamWriter wrapped) Constructs a StatefulWriter.
| |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(String name, String value) Overrides com. Implements com. | |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() | |
| close | back to summary |
|---|---|
| public void close() Overrides com. Implements com. Doc from com. Close the writer, if necessary. | |
| endNode | back to summary |
|---|---|
| public void endNode() Overrides com. Implements com. | |
| flush | back to summary |
|---|---|
| public void flush() Overrides com. Implements com. Doc from com. Flush the writer, if necessary. | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() | |
| setValue | back to summary |
|---|---|
| public void setValue(String text) Overrides com. Implements com. Doc from com. Write the value (text content) of the current node. | |
| startNode | back to summary |
|---|---|
| public void startNode(final String name) Overrides com. Implements com. | |
| startNode | back to summary |
|---|---|
| public void startNode(final String name, final Class<T> clazz) Overrides com. Implements com. | |
| startNodeCommon | back to summary |
|---|---|
| private void startNodeCommon() | |
| state | back to summary |
|---|---|
| public int state() Retrieve the state of the writer.
| |