Package com.ctc.wstx.stax
Class WstxOutputFactory
java.lang.Object
javax.xml.stream.XMLOutputFactory
org.codehaus.stax2.XMLOutputFactory2
com.ctc.wstx.stax.WstxOutputFactory
- All Implemented Interfaces:
OutputConfigFlags
,org.codehaus.stax2.XMLStreamProperties
public class WstxOutputFactory
extends org.codehaus.stax2.XMLOutputFactory2
implements OutputConfigFlags
Implementation of
XMLOutputFactory
for Wstx.
TODO:
- Implement outputter that creates SAX events (DOM-backed writer exists as of Woodstox 3.2)
-
Field Summary
FieldsFields inherited from class org.codehaus.stax2.XMLOutputFactory2
P_ATTR_VALUE_ESCAPER, P_AUTO_CLOSE_OUTPUT, P_AUTOMATIC_EMPTY_ELEMENTS, P_AUTOMATIC_NS_PREFIX, P_TEXT_ESCAPER
Fields inherited from class javax.xml.stream.XMLOutputFactory
IS_REPAIRING_NAMESPACES
Fields inherited from interface com.ctc.wstx.cfg.OutputConfigFlags
CFG_ADD_SPACE_AFTER_EMPTY_ELEM, CFG_AUTO_CLOSE_OUTPUT, CFG_AUTOMATIC_EMPTY_ELEMENTS, CFG_AUTOMATIC_END_ELEMENTS, CFG_AUTOMATIC_NS, CFG_COPY_DEFAULT_ATTRS, CFG_ENABLE_NS, CFG_ESCAPE_CR, CFG_FIX_CONTENT, CFG_OUTPUT_CDATA_AS_TEXT, CFG_USE_DOUBLE_QUOTES_IN_XML_DECL, CFG_VALIDATE_ATTR, CFG_VALIDATE_CONTENT, CFG_VALIDATE_NAMES, CFG_VALIDATE_STRUCTURE
Fields inherited from interface org.codehaus.stax2.XMLStreamProperties
XSP_IMPLEMENTATION_NAME, XSP_IMPLEMENTATION_VERSION, XSP_NAMESPACE_AWARE, XSP_PROBLEM_REPORTER, XSP_SUPPORT_XMLID, XSP_SUPPORTS_XML11, XSP_V_XMLID_FULL, XSP_V_XMLID_NONE, XSP_V_XMLID_TYPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
private org.codehaus.stax2.XMLStreamWriter2
createSW
(OutputStream out, Writer w, String enc, boolean requireAutoClose) Bottleneck factory method used internally; needs to take care of passing proper settings to stream writer.protected org.codehaus.stax2.XMLStreamWriter2
createSW
(String enc, WriterConfig cfg, XmlWriter xw) Called by {code createSW(OutputStream, Writer, String, boolean)} after all of the necessary configuration logic is complete.private org.codehaus.stax2.XMLStreamWriter2
createXMLEventWriter
(OutputStream out, String enc) createXMLEventWriter
(Writer w, String enc) createXMLEventWriter
(Result result) createXMLStreamWriter
(OutputStream out, String enc) org.codehaus.stax2.XMLStreamWriter2
createXMLStreamWriter
(Writer w, String enc) createXMLStreamWriter
(Result result) getProperty
(String name) boolean
isPropertySupported
(String name) void
setProperty
(String name, Object value) Methods inherited from class javax.xml.stream.XMLOutputFactory
newFactory, newFactory, newInstance, newInstance
-
Field Details
-
mConfig
-
-
Constructor Details
-
WstxOutputFactory
public WstxOutputFactory()
-
-
Method Details
-
createXMLEventWriter
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLStreamWriter
- Specified by:
createXMLStreamWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLStreamWriter
public XMLStreamWriter createXMLStreamWriter(OutputStream out, String enc) throws XMLStreamException - Specified by:
createXMLStreamWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLStreamWriter
- Specified by:
createXMLStreamWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLStreamWriter
- Specified by:
createXMLStreamWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
getProperty
- Specified by:
getProperty
in classXMLOutputFactory
-
isPropertySupported
- Specified by:
isPropertySupported
in classXMLOutputFactory
-
setProperty
- Specified by:
setProperty
in classXMLOutputFactory
-
createXMLEventWriter
- Specified by:
createXMLEventWriter
in classorg.codehaus.stax2.XMLOutputFactory2
- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriter
in classorg.codehaus.stax2.XMLOutputFactory2
- Throws:
XMLStreamException
-
createXMLStreamWriter
public org.codehaus.stax2.XMLStreamWriter2 createXMLStreamWriter(Writer w, String enc) throws XMLStreamException - Specified by:
createXMLStreamWriter
in classorg.codehaus.stax2.XMLOutputFactory2
- Throws:
XMLStreamException
-
configureForXmlConformance
public void configureForXmlConformance()- Specified by:
configureForXmlConformance
in classorg.codehaus.stax2.XMLOutputFactory2
-
configureForRobustness
public void configureForRobustness()- Specified by:
configureForRobustness
in classorg.codehaus.stax2.XMLOutputFactory2
-
configureForSpeed
public void configureForSpeed()- Specified by:
configureForSpeed
in classorg.codehaus.stax2.XMLOutputFactory2
-
getConfig
-
createSW
private org.codehaus.stax2.XMLStreamWriter2 createSW(OutputStream out, Writer w, String enc, boolean requireAutoClose) throws XMLStreamException Bottleneck factory method used internally; needs to take care of passing proper settings to stream writer.- Parameters:
requireAutoClose
- Whether this result will always require auto-close be enabled (true); or only if application has requested it (false)- Throws:
XMLStreamException
-
createSW
Called by {code createSW(OutputStream, Writer, String, boolean)} after all of the necessary configuration logic is complete. -
createSW
- Throws:
XMLStreamException
-