|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.staxmate.out.SMOutputtable
org.codehaus.staxmate.out.SMOutputContainer
org.codehaus.staxmate.out.SMBufferedFragment
public final class SMBufferedFragment
Buffered fragment; starts its life buffered, so that its content are not automatically written to the underlying stream, but only when buffered instance is released. Once released, can not be buffered again.
| Field Summary | |
|---|---|
protected static int |
LAST_BLOCKED
|
protected static int |
LAST_BUFFERED
|
protected int |
mState
All instances are initially buffered; state will be changed when instance is released (and further on with other changes) |
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
|
| Fields inherited from class org.codehaus.staxmate.out.SMOutputtable |
|---|
mNext |
| Constructor Summary | |
|---|---|
protected |
SMBufferedFragment(SMOutputContext ctxt)
|
| Method Summary | |
|---|---|
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 boolean |
doOutput(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. |
protected void |
forceOutput(SMOutputContext ctxt)
Method similar to SMOutputtable.doOutput(org.codehaus.staxmate.out.SMOutputContext, boolean), except that this method will
always succeed in doing the output. |
void |
getPath(java.lang.StringBuilder sb)
|
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) |
| Methods inherited from class org.codehaus.staxmate.out.SMOutputContainer |
|---|
addAndReleaseBuffered, addBuffered, addCData, addCData, addCharacters, addCharacters, addCharacters, addComment, addElement, addElement, addEntityRef, addProcessingInstruction, addValue, addValue, addValue, closeAllButLastChild, closeAndOutputChildren, createBufferedElement, createBufferedFragment, forceChildOutput, getContext, getNamespace, getNamespace, getParent, getPath, linkNewChild, setIndentation, throwBuffered, throwClosed, throwRelinking |
| Methods inherited from class org.codehaus.staxmate.out.SMOutputtable |
|---|
getNext, linkNext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 mState
| Constructor Detail |
|---|
protected SMBufferedFragment(SMOutputContext ctxt)
| Method Detail |
|---|
public boolean isBuffered()
isBuffered in interface SMBufferable
public void linkParent(SMOutputContainer parent,
boolean blocked)
throws javax.xml.stream.XMLStreamException
SMBufferable
linkParent in interface SMBufferableparent - 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.
javax.xml.stream.XMLStreamException
public void release()
throws javax.xml.stream.XMLStreamException
SMBufferable
release in interface SMBufferablejavax.xml.stream.XMLStreamException
protected void childReleased(SMOutputtable child)
throws javax.xml.stream.XMLStreamException
SMOutputContainer
childReleased in class SMOutputContainerchild - Child node that now neither is nor contains any buffered
nodes.
javax.xml.stream.XMLStreamException
protected boolean doOutput(SMOutputContext ctxt,
boolean canClose)
throws javax.xml.stream.XMLStreamException
SMOutputtable
doOutput in class SMOutputContainerctxt - 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.
javax.xml.stream.XMLStreamException
protected void forceOutput(SMOutputContext ctxt)
throws javax.xml.stream.XMLStreamException
SMOutputtableSMOutputtable.doOutput(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 SMOutputContainerjavax.xml.stream.XMLStreamException
public boolean canOutputNewChild()
throws javax.xml.stream.XMLStreamException
SMOutputContainer
canOutputNewChild in class SMOutputContainerjavax.xml.stream.XMLStreamExceptionpublic void getPath(java.lang.StringBuilder sb)
getPath in class SMOutputContainer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||