|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thoughtworks.xstream.io.AbstractWriter
com.thoughtworks.xstream.io.xml.AbstractXmlWriter
com.thoughtworks.xstream.io.xml.StaxWriter
public class StaxWriter
A stream writing that outputs to a StAX stream writer
Constructor Summary | |
---|---|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out)
|
|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
boolean writeEnclosingDocument,
boolean namespaceRepairingMode)
Allows a StaxWriter to be created for partial XML output |
|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
boolean writeEnclosingDocument,
boolean namespaceRepairingMode,
NameCoder nameCoder)
Allows a StaxWriter to be created for partial XML output |
|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
boolean writeEnclosingDocument,
boolean namespaceRepairingMode,
XmlFriendlyReplacer replacer)
Deprecated. As of 1.4 use StaxWriter(QNameMap, XMLStreamWriter, boolean, boolean, NameCoder)
instead |
|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
NameCoder nameCoder)
Allows a StaxWriter to be created for partial XML output |
Method Summary | |
---|---|
void |
addAttribute(String name,
String value)
|
void |
close()
Call this method when you're finished with me |
void |
endNode()
|
void |
flush()
Flush the writer, if necessary. |
protected QNameMap |
getQNameMap()
|
protected XMLStreamWriter |
getXMLStreamWriter()
|
boolean |
isNamespaceRepairingMode()
Is StAX namespace repairing mode on or off? |
void |
setValue(String text)
Write the value (text content) of the current node. |
void |
startNode(String name)
|
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlWriter |
---|
escapeXmlName |
Methods inherited from class com.thoughtworks.xstream.io.AbstractWriter |
---|
encodeAttribute, encodeNode, startNode, underlyingWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaxWriter(QNameMap qnameMap, XMLStreamWriter out) throws XMLStreamException
XMLStreamException
public StaxWriter(QNameMap qnameMap, XMLStreamWriter out, NameCoder nameCoder) throws XMLStreamException
qnameMap
- is the mapper of Java class names to QNamesout
- the stream to output tonameCoder
- the xml-friendly replacer to escape Java names
XMLStreamException
- if the events could not be written to the outputpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode, NameCoder nameCoder) throws XMLStreamException
qnameMap
- is the mapper of Java class names to QNamesout
- the stream to output towriteEnclosingDocument
- a flag to indicate whether or not the start/end document
events should be writtennamespaceRepairingMode
- a flag to enable StAX' namespace repairing modenameCoder
- the xml-friendly replacer to escape Java names
XMLStreamException
- if the events could not be written to the outputpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode) throws XMLStreamException
qnameMap
- is the mapper of Java class names to QNamesout
- the stream to output towriteEnclosingDocument
- a flag to indicate whether or not the start/end document
events should be written
XMLStreamException
- if the events could not be written to the outputpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode, XmlFriendlyReplacer replacer) throws XMLStreamException
StaxWriter(QNameMap, XMLStreamWriter, boolean, boolean, NameCoder)
instead
qnameMap
- is the mapper of Java class names to QNamesout
- the stream to output towriteEnclosingDocument
- a flag to indicate whether or not the start/end document
events should be writtenreplacer
- the xml-friendly replacer to escape Java names
XMLStreamException
- if the events could not be written to the outputMethod Detail |
---|
public void flush()
HierarchicalStreamWriter
public void close()
public void addAttribute(String name, String value)
public void endNode()
public void setValue(String text)
HierarchicalStreamWriter
public void startNode(String name)
public boolean isNamespaceRepairingMode()
protected QNameMap getQNameMap()
protected XMLStreamWriter getXMLStreamWriter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |