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_ESCAPERFields inherited from class XMLOutputFactory
IS_REPAIRING_NAMESPACESFields inherited from interface 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_STRUCTUREFields 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 TypeMethodDescriptionvoidvoidvoidprivate org.codehaus.stax2.XMLStreamWriter2createSW(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.XMLStreamWriter2createSW(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.XMLStreamWriter2createXMLEventWriter(OutputStream out, String enc) createXMLEventWriter(Writer w, String enc) createXMLEventWriter(Result result) createXMLStreamWriter(OutputStream out, String enc) org.codehaus.stax2.XMLStreamWriter2createXMLStreamWriter(Writer w, String enc) createXMLStreamWriter(Result result) getProperty(String name) booleanisPropertySupported(String name) voidsetProperty(String name, Object value) Methods inherited from class XMLOutputFactory
newDefaultFactory, newFactory, newFactory, newInstance, newInstance
-
Field Details
-
mConfig
-
-
Constructor Details
-
WstxOutputFactory
public WstxOutputFactory()
-
-
Method Details
-
createXMLEventWriter
- Specified by:
createXMLEventWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLStreamWriter
- Specified by:
createXMLStreamWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLStreamWriter
public XMLStreamWriter createXMLStreamWriter(OutputStream out, String enc) throws XMLStreamException - Specified by:
createXMLStreamWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLStreamWriter
- Specified by:
createXMLStreamWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
createXMLStreamWriter
- Specified by:
createXMLStreamWriterin classXMLOutputFactory- Throws:
XMLStreamException
-
getProperty
- Specified by:
getPropertyin classXMLOutputFactory
-
isPropertySupported
- Specified by:
isPropertySupportedin classXMLOutputFactory
-
setProperty
- Specified by:
setPropertyin classXMLOutputFactory
-
createXMLEventWriter
- Specified by:
createXMLEventWriterin classorg.codehaus.stax2.XMLOutputFactory2- Throws:
XMLStreamException
-
createXMLEventWriter
- Specified by:
createXMLEventWriterin classorg.codehaus.stax2.XMLOutputFactory2- Throws:
XMLStreamException
-
createXMLStreamWriter
public org.codehaus.stax2.XMLStreamWriter2 createXMLStreamWriter(Writer w, String enc) throws XMLStreamException - Specified by:
createXMLStreamWriterin classorg.codehaus.stax2.XMLOutputFactory2- Throws:
XMLStreamException
-
configureForXmlConformance
public void configureForXmlConformance()- Specified by:
configureForXmlConformancein classorg.codehaus.stax2.XMLOutputFactory2
-
configureForRobustness
public void configureForRobustness()- Specified by:
configureForRobustnessin classorg.codehaus.stax2.XMLOutputFactory2
-
configureForSpeed
public void configureForSpeed()- Specified by:
configureForSpeedin 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
-