Package org.codehaus.staxmate.out
Class SMSimpleOutput
java.lang.Object
org.codehaus.staxmate.out.SMOutputtable
org.codehaus.staxmate.out.SMSimpleOutput
- Direct Known Subclasses:
SMOAttribute
,SMOAttribute.Binary
,SMOAttribute.IntAttribute
,SMOCData
,SMOCharacters
,SMOComment
,SMOEntityRef
,SMONamespace
,SMOProcInstr
,SMOTypedValue
Intermediate base class used for simple (non-container) output nodes;
comments, processing instructions, text, CDATA and entities.
Instances of such nodes are only created when output is blocked, and
they can not be output in fully streaming manner.
-
Field Summary
Fields inherited from class org.codehaus.staxmate.out.SMOutputtable
_next
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_forceOutput
(SMOutputContext ctxt) Method similar toSMOutputtable._output(org.codehaus.staxmate.out.SMOutputContext, boolean)
, except that this method will always succeed in doing the output.protected abstract 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.Methods inherited from class org.codehaus.staxmate.out.SMOutputtable
_linkNext, getNext
-
Constructor Details
-
SMSimpleOutput
protected SMSimpleOutput()
-
-
Method Details
-
_output
protected abstract boolean _output(SMOutputContext ctxt, boolean canClose) throws XMLStreamException Description copied from class:SMOutputtable
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. In both cases output can fail or be only a partial one: buffered nodes will not be output at all, and nodes with buffered children can only be partially output.- Specified by:
_output
in classSMOutputtable
- Parameters:
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.- Returns:
- True if the whole node could be output, ie. neither it nor its children are buffered.
- Throws:
XMLStreamException
-
_forceOutput
Description copied from class:SMOutputtable
Method similar toSMOutputtable._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.- Specified by:
_forceOutput
in classSMOutputtable
- Throws:
XMLStreamException
-