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 ofXMLOutputFactoryfor 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 WriterConfigmConfig-
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 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureForRobustness()voidconfigureForSpeed()voidconfigureForXmlConformance()private org.codehaus.stax2.XMLStreamWriter2createSW(java.io.OutputStream out, java.io.Writer w, java.lang.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(java.lang.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.XMLStreamWriter2createSW(javax.xml.transform.Result res)javax.xml.stream.XMLEventWritercreateXMLEventWriter(java.io.OutputStream out)javax.xml.stream.XMLEventWritercreateXMLEventWriter(java.io.OutputStream out, java.lang.String enc)javax.xml.stream.XMLEventWritercreateXMLEventWriter(java.io.Writer w)javax.xml.stream.XMLEventWritercreateXMLEventWriter(java.io.Writer w, java.lang.String enc)javax.xml.stream.XMLEventWritercreateXMLEventWriter(javax.xml.stream.XMLStreamWriter sw)javax.xml.stream.XMLEventWritercreateXMLEventWriter(javax.xml.transform.Result result)javax.xml.stream.XMLStreamWritercreateXMLStreamWriter(java.io.OutputStream out)javax.xml.stream.XMLStreamWritercreateXMLStreamWriter(java.io.OutputStream out, java.lang.String enc)javax.xml.stream.XMLStreamWritercreateXMLStreamWriter(java.io.Writer w)org.codehaus.stax2.XMLStreamWriter2createXMLStreamWriter(java.io.Writer w, java.lang.String enc)javax.xml.stream.XMLStreamWritercreateXMLStreamWriter(javax.xml.transform.Result result)WriterConfiggetConfig()java.lang.ObjectgetProperty(java.lang.String name)booleanisPropertySupported(java.lang.String name)voidsetProperty(java.lang.String name, java.lang.Object value)
-
-
-
Field Detail
-
mConfig
protected final WriterConfig mConfig
-
-
Method Detail
-
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream out) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLEventWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream out, java.lang.String enc) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLEventWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLEventWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.Writer w) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLEventWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLStreamWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream out, java.lang.String enc) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLStreamWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLStreamWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
createXMLStreamWriter
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.Writer w) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLStreamWriterin classjavax.xml.stream.XMLOutputFactory- Throws:
javax.xml.stream.XMLStreamException
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getPropertyin classjavax.xml.stream.XMLOutputFactory
-
isPropertySupported
public boolean isPropertySupported(java.lang.String name)
- Specified by:
isPropertySupportedin classjavax.xml.stream.XMLOutputFactory
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)- Specified by:
setPropertyin classjavax.xml.stream.XMLOutputFactory
-
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.Writer w, java.lang.String enc) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLEventWriterin classorg.codehaus.stax2.XMLOutputFactory2- Throws:
javax.xml.stream.XMLStreamException
-
createXMLEventWriter
public javax.xml.stream.XMLEventWriter createXMLEventWriter(javax.xml.stream.XMLStreamWriter sw) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLEventWriterin classorg.codehaus.stax2.XMLOutputFactory2- Throws:
javax.xml.stream.XMLStreamException
-
createXMLStreamWriter
public org.codehaus.stax2.XMLStreamWriter2 createXMLStreamWriter(java.io.Writer w, java.lang.String enc) throws javax.xml.stream.XMLStreamException- Specified by:
createXMLStreamWriterin classorg.codehaus.stax2.XMLOutputFactory2- Throws:
javax.xml.stream.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
public WriterConfig getConfig()
-
createSW
private org.codehaus.stax2.XMLStreamWriter2 createSW(java.io.OutputStream out, java.io.Writer w, java.lang.String enc, boolean requireAutoClose) throws javax.xml.stream.XMLStreamExceptionBottleneck 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:
javax.xml.stream.XMLStreamException
-
createSW
protected org.codehaus.stax2.XMLStreamWriter2 createSW(java.lang.String enc, WriterConfig cfg, XmlWriter xw)Called by {code createSW(OutputStream, Writer, String, boolean)} after all of the necessary configuration logic is complete.
-
createSW
private org.codehaus.stax2.XMLStreamWriter2 createSW(javax.xml.transform.Result res) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
-