public class

StaxReader

extends AbstractPullReader
java.lang.Object
   ↳ com.thoughtworks.xstream.io.xml.AbstractXmlReader
     ↳ com.thoughtworks.xstream.io.xml.AbstractPullReader
       ↳ com.thoughtworks.xstream.io.xml.StaxReader

Class Overview

A reader using the StAX API.

Summary

[Expand]
Inherited Constants
From class com.thoughtworks.xstream.io.xml.AbstractPullReader
Public Constructors
StaxReader(QNameMap qnameMap, XMLStreamReader in)
StaxReader(QNameMap qnameMap, XMLStreamReader in, XmlFriendlyReplacer replacer)
Public Methods
void appendErrors(ErrorWriter errorWriter)
void close()
String getAttribute(String name)
String getAttribute(int index)
int getAttributeCount()
String getAttributeName(int index)
Protected Methods
String pullElementName()
Pull the name of the current element from the stream.
int pullNextEvent()
Pull the next event from the stream.
String pullText()
Pull the contents of the current text node from the stream.
[Expand]
Inherited Methods
From class com.thoughtworks.xstream.io.xml.AbstractPullReader
From class com.thoughtworks.xstream.io.xml.AbstractXmlReader
From class java.lang.Object
From interface com.thoughtworks.xstream.io.HierarchicalStreamReader
From interface com.thoughtworks.xstream.io.xml.XmlFriendlyReader

Public Constructors

public StaxReader (QNameMap qnameMap, XMLStreamReader in)

public StaxReader (QNameMap qnameMap, XMLStreamReader in, XmlFriendlyReplacer replacer)

Public Methods

public void appendErrors (ErrorWriter errorWriter)

public void close ()

public String getAttribute (String name)

public String getAttribute (int index)

public int getAttributeCount ()

public String getAttributeName (int index)

Protected Methods

protected String pullElementName ()

Pull the name of the current element from the stream.

protected int pullNextEvent ()

Pull the next event from the stream.

This MUST return START_NODE, END_NODE, TEXT, COMMENT, OTHER or throw StreamException.

The underlying pull parser will most likely return its own event types. These must be mapped to the appropriate events.

protected String pullText ()

Pull the contents of the current text node from the stream.