public final class SMBufferedFragment extends SMOutputContainer implements SMBufferable
Modifier and Type | Field and Description |
---|---|
protected int |
_state
All instances are initially buffered; state will be changed when
instance is released (and further on with other changes)
|
protected static int |
LAST_BLOCKED |
protected static int |
LAST_BUFFERED |
protected static int |
STATE_BLOCKED |
protected static int |
STATE_BUFFERED |
protected static int |
STATE_BUFFERED_AND_BLOCKED |
protected static int |
STATE_CLOSED |
protected static int |
STATE_OPEN |
_context, _firstChild, _lastChild, _parent
_next
Modifier | Constructor and Description |
---|---|
protected |
SMBufferedFragment(SMOutputContext ctxt) |
Modifier and Type | Method and Description |
---|---|
boolean |
_canOutputNewChild()
Method called to figure out if we can just output a newly added
child, without any buffering.
|
protected void |
_childReleased(SMOutputtable child)
Method called by a child, when it is released and neither is or
contains any buffered entities.
|
protected void |
_forceOutput(SMOutputContext ctxt)
Method similar to
SMOutputtable._output(org.codehaus.staxmate.out.SMOutputContext, boolean) , except that this method will
always succeed in doing the output. |
protected boolean |
_output(SMOutputContext ctxt,
boolean canClose)
Method called to request that the entity output itself; either
as much as it can without closing, or as much as it can if it is to
get closed.
|
void |
getPath(StringBuilder sb)
Method that can be called to get an XPath like description
of the relative location of this output node, starting from root.
|
boolean |
isBuffered() |
void |
linkParent(SMOutputContainer parent,
boolean blocked)
Method called by a container when bufferable item is linked as its
child.
|
void |
release()
Method called to signal that the node need not be buffered any more
(if not required to do so by parent/children restrictions)
|
_closeAllButLastChild, _closeAndOutputChildren, _forceChildOutput, _linkNewChild, _throwClosed, _throwRelinking, _verifyNamespaceArg, addAndReleaseBuffered, addBuffered, addCData, addCData, addCharacters, addCharacters, addComment, addElement, addElement, addElementWithCharacters, addEntityRef, addProcessingInstruction, addValue, addValue, addValue, addValue, addValue, addValue, createBufferedElement, createBufferedFragment, getContext, getNamespace, getNamespace, getParent, getPath, setIndentation
_linkNext, getNext
protected static final int STATE_BUFFERED_AND_BLOCKED
protected static final int STATE_BUFFERED
protected static final int STATE_BLOCKED
protected static final int STATE_OPEN
protected static final int STATE_CLOSED
protected static final int LAST_BUFFERED
protected static final int LAST_BLOCKED
protected int _state
protected SMBufferedFragment(SMOutputContext ctxt)
public boolean isBuffered()
isBuffered
in interface SMBufferable
public void linkParent(SMOutputContainer parent, boolean blocked) throws XMLStreamException
SMBufferable
linkParent
in interface SMBufferable
parent
- Container to attach bufferable instance underblocked
- If true, parent output is blocked (and as the result
so is bufferable's); if false, parent is (and will remain)
unblocked.XMLStreamException
public void release() throws XMLStreamException
SMBufferable
release
in interface SMBufferable
XMLStreamException
protected void _childReleased(SMOutputtable child) throws XMLStreamException
SMOutputContainer
_childReleased
in class SMOutputContainer
child
- Child node that now neither is nor contains any buffered
nodes.XMLStreamException
protected boolean _output(SMOutputContext ctxt, boolean canClose) throws XMLStreamException
SMOutputtable
_output
in class SMOutputContainer
ctxt
- Output context to use for outputting this node (and
its contents)canClose
- If true, indicates that the node can (and should)
be fully closed if possible. This (passing true) is usually done
when a new sibling
is added after a node (element/fragment); if so, current one
should be recursively closed. If false, should only try to output
as much as can be done without forcing closures.XMLStreamException
protected void _forceOutput(SMOutputContext ctxt) throws XMLStreamException
SMOutputtable
SMOutputtable._output(org.codehaus.staxmate.out.SMOutputContext, boolean)
, except that this method will
always succeed in doing the output. Specifically, it will force all
buffered nodes to be unbuffered, and then output._forceOutput
in class SMOutputContainer
XMLStreamException
public boolean _canOutputNewChild() throws XMLStreamException
SMOutputContainer
_canOutputNewChild
in class SMOutputContainer
XMLStreamException
public void getPath(StringBuilder sb)
SMOutputContainer
getPath
in class SMOutputContainer
Copyright © 2013 FasterXML. All Rights Reserved.