javanet.staxutils
Class BaseXMLStreamReader
java.lang.Object
javanet.staxutils.BaseXMLStreamReader
- All Implemented Interfaces:
- XMLStreamConstants, XMLStreamReader
public abstract class BaseXMLStreamReader
- extends Object
- implements XMLStreamReader
Abstract base class for XMLStreamReader
implementations.
- Version:
- $Revision: 1.2 $
- Author:
- Christian Niles
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.stream.XMLStreamReader |
close, getAttributeCount, getAttributeName, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getPIData, getPITarget, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasNext, isAttributeSpecified, isStandalone, next, standaloneSet |
systemId
protected String systemId
- The stream system ID.
encoding
protected String encoding
- The stream encoding.
BaseXMLStreamReader
public BaseXMLStreamReader()
BaseXMLStreamReader
public BaseXMLStreamReader(String systemId,
String encoding)
getSystemId
public String getSystemId()
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interface XMLStreamReader
getEventTypeName
public String getEventTypeName()
- Returns the name of the current event type.
- Returns:
- The name of the current event type.
nextTag
public int nextTag()
throws XMLStreamException
- Specified by:
nextTag
in interface XMLStreamReader
- Throws:
XMLStreamException
isCharacters
public boolean isCharacters()
- Specified by:
isCharacters
in interface XMLStreamReader
isEndElement
public boolean isEndElement()
- Specified by:
isEndElement
in interface XMLStreamReader
isStartElement
public boolean isStartElement()
- Specified by:
isStartElement
in interface XMLStreamReader
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpace
in interface XMLStreamReader
hasName
public boolean hasName()
- Specified by:
hasName
in interface XMLStreamReader
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interface XMLStreamReader
hasText
public boolean hasText()
- Specified by:
hasText
in interface XMLStreamReader
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURI
in interface XMLStreamReader
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURI
in interface XMLStreamReader
getAttributeLocalName
public String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalName
in interface XMLStreamReader
getAttributeNamespace
public String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespace
in interface XMLStreamReader
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interface XMLStreamReader
require
public void require(int type,
String namespaceURI,
String localName)
throws XMLStreamException
- Specified by:
require
in interface XMLStreamReader
- Throws:
XMLStreamException
getElementText
public String getElementText()
throws XMLStreamException
- Specified by:
getElementText
in interface XMLStreamReader
- Throws:
XMLStreamException
getStableLocation
public Location getStableLocation()
- Constructs a new, stable
Location
from the current stream location.
If the stream location implements StaticLocation
, then the stream
location will be returned directly.
- Returns:
- Constructs a new, stable
Location
from the current stream
location, or the current Location
itself if it is already
stable.