public abstract class

AbstractPullReader

extends AbstractXmlReader
java.lang.Object
   ↳ com.thoughtworks.xstream.io.xml.AbstractXmlReader
     ↳ com.thoughtworks.xstream.io.xml.AbstractPullReader
Known Direct Subclasses

Class Overview

Base class that contains common functionality across HierarchicalStreamReader implementations that need to read from a pull parser.

Summary

Constants
int COMMENT
int END_NODE
int OTHER
int START_NODE
int TEXT
Protected Constructors
AbstractPullReader(XmlFriendlyReplacer replacer)
Public Methods
Iterator getAttributeNames()
String getNodeName()
String getValue()
boolean hasMoreChildren()
void mark()
void moveDown()
void moveUp()
void reset()
HierarchicalStreamReader underlyingReader()
Protected Methods
abstract String pullElementName()
Pull the name of the current element from the stream.
abstract int pullNextEvent()
Pull the next event from the stream.
abstract String pullText()
Pull the contents of the current text node from the stream.
[Expand]
Inherited Methods
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

Constants

protected static final int COMMENT

Constant Value: 4 (0x00000004)

protected static final int END_NODE

Constant Value: 2 (0x00000002)

protected static final int OTHER

Constant Value: 0 (0x00000000)

protected static final int START_NODE

Constant Value: 1 (0x00000001)

protected static final int TEXT

Constant Value: 3 (0x00000003)

Protected Constructors

protected AbstractPullReader (XmlFriendlyReplacer replacer)

Public Methods

public Iterator getAttributeNames ()

public String getNodeName ()

public String getValue ()

public boolean hasMoreChildren ()

public void mark ()

public void moveDown ()

public void moveUp ()

public void reset ()

public HierarchicalStreamReader underlyingReader ()

Protected Methods

protected abstract String pullElementName ()

Pull the name of the current element from the stream.

protected abstract 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 abstract String pullText ()

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