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 ofXMLOutputFactory
for Wstx.TODO:
- Implement outputter that creates SAX events (DOM-backed writer exists as of Woodstox 3.2)
-
-
Field Summary
Fields Modifier and Type Field Description protected WriterConfig
mConfig
-
Fields 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
-
-
Constructor Summary
Constructors Constructor Description WstxOutputFactory()
-
Method Summary
-
Methods inherited from class javax.xml.stream.XMLOutputFactory
newDefaultFactory, newFactory, newFactory, newInstance, newInstance
-
-
-
-
Field Detail
-
mConfig
protected final WriterConfig mConfig
-
-
Method Detail
-
createXMLEventWriter
public XMLEventWriter createXMLEventWriter(OutputStream out) throws XMLStreamException
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLEventWriter
public XMLEventWriter createXMLEventWriter(OutputStream out, String enc) throws XMLStreamException
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLEventWriter
public XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLEventWriter
public XMLEventWriter createXMLEventWriter(Writer w) throws XMLStreamException
- Specified by:
createXMLEventWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLStreamWriter
public XMLStreamWriter createXMLStreamWriter(OutputStream out) throws XMLStreamException
- 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
public XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException
- Specified by:
createXMLStreamWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
createXMLStreamWriter
public XMLStreamWriter createXMLStreamWriter(Writer w) throws XMLStreamException
- Specified by:
createXMLStreamWriter
in classXMLOutputFactory
- Throws:
XMLStreamException
-
getProperty
public Object getProperty(String name)
- Specified by:
getProperty
in classXMLOutputFactory
-
isPropertySupported
public boolean isPropertySupported(String name)
- Specified by:
isPropertySupported
in classXMLOutputFactory
-
setProperty
public void setProperty(String name, Object value)
- Specified by:
setProperty
in classXMLOutputFactory
-
createXMLEventWriter
public XMLEventWriter createXMLEventWriter(Writer w, String enc) throws XMLStreamException
- Specified by:
createXMLEventWriter
in classorg.codehaus.stax2.XMLOutputFactory2
- Throws:
XMLStreamException
-
createXMLEventWriter
public XMLEventWriter createXMLEventWriter(XMLStreamWriter sw) throws XMLStreamException
- 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
public WriterConfig getConfig()
-
createSW
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.
-
-