public class

StaxWriter

extends AbstractXmlWriter
java.lang.Object
   ↳ com.thoughtworks.xstream.io.xml.AbstractXmlWriter
     ↳ com.thoughtworks.xstream.io.xml.StaxWriter
Known Direct Subclasses

Class Overview

A stream writing that outputs to a StAX stream writer

Summary

Public Constructors
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, XmlFriendlyReplacer replacer)
Allows a StaxWriter to be created for partial XML output
Public Methods
void addAttribute(String name, String value)
void close()
Call this method when you're finished with me
void endNode()
void flush()
boolean isNamespaceRepairingMode()
Is StAX namespace repairing mode on or off?
void setValue(String text)
void startNode(String name)
Protected Methods
QNameMap getQNameMap()
XMLStreamWriter getXMLStreamWriter()
[Expand]
Inherited Methods
From class com.thoughtworks.xstream.io.xml.AbstractXmlWriter
From class java.lang.Object
From interface com.thoughtworks.xstream.io.ExtendedHierarchicalStreamWriter
From interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
From interface com.thoughtworks.xstream.io.xml.XmlFriendlyWriter

Public Constructors

public StaxWriter (QNameMap qnameMap, XMLStreamWriter out)

Throws
XMLStreamException

public StaxWriter (QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode)

Allows a StaxWriter to be created for partial XML output

Parameters
qnameMap is the mapper of Java class names to QNames
out the stream to output to
writeEnclosingDocument a flag to indicate whether or not the start/end document events should be written
Throws
XMLStreamException if the events could not be written to the output

public StaxWriter (QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode, XmlFriendlyReplacer replacer)

Allows a StaxWriter to be created for partial XML output

Parameters
qnameMap is the mapper of Java class names to QNames
out the stream to output to
writeEnclosingDocument a flag to indicate whether or not the start/end document events should be written
replacer the xml-friendly replacer to escape Java names
Throws
XMLStreamException if the events could not be written to the output

Public Methods

public void addAttribute (String name, String value)

public void close ()

Call this method when you're finished with me

public void endNode ()

public void flush ()

public boolean isNamespaceRepairingMode ()

Is StAX namespace repairing mode on or off?

public void setValue (String text)

public void startNode (String name)

Protected Methods

protected QNameMap getQNameMap ()

protected XMLStreamWriter getXMLStreamWriter ()