Package 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 forXMLStreamReaderimplementations.- Version:
- $Revision: 1.2 $
- Author:
- Christian Niles
-
-
Field Summary
Fields Modifier and Type Field Description protected StringencodingThe stream encoding.protected StringsystemIdThe stream system ID.-
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
-
-
Constructor Summary
Constructors Constructor Description BaseXMLStreamReader()BaseXMLStreamReader(String systemId, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttributeLocalName(int index)StringgetAttributeNamespace(int index)StringgetAttributePrefix(int index)StringgetElementText()StringgetEncoding()StringgetEventTypeName()Returns the name of the current event type.StringgetNamespaceURI()StringgetNamespaceURI(String prefix)StringgetPrefix()LocationgetStableLocation()Constructs a new, stableLocationfrom the current stream location.StringgetSystemId()booleanhasName()booleanhasText()booleanisCharacters()booleanisEndElement()booleanisStartElement()booleanisWhiteSpace()intnextTag()voidrequire(int type, String namespaceURI, String localName)-
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
-
-
-
-
Method Detail
-
getSystemId
public String getSystemId()
-
getEncoding
public String getEncoding()
- Specified by:
getEncodingin interfaceXMLStreamReader
-
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:
nextTagin interfaceXMLStreamReader- Throws:
XMLStreamException
-
isCharacters
public boolean isCharacters()
- Specified by:
isCharactersin interfaceXMLStreamReader
-
isEndElement
public boolean isEndElement()
- Specified by:
isEndElementin interfaceXMLStreamReader
-
isStartElement
public boolean isStartElement()
- Specified by:
isStartElementin interfaceXMLStreamReader
-
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpacein interfaceXMLStreamReader
-
hasName
public boolean hasName()
- Specified by:
hasNamein interfaceXMLStreamReader
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceXMLStreamReader
-
hasText
public boolean hasText()
- Specified by:
hasTextin interfaceXMLStreamReader
-
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURIin interfaceXMLStreamReader
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceXMLStreamReader
-
getAttributeLocalName
public String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalNamein interfaceXMLStreamReader
-
getAttributeNamespace
public String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespacein interfaceXMLStreamReader
-
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefixin interfaceXMLStreamReader
-
require
public void require(int type, String namespaceURI, String localName) throws XMLStreamException- Specified by:
requirein interfaceXMLStreamReader- Throws:
XMLStreamException
-
getElementText
public String getElementText() throws XMLStreamException
- Specified by:
getElementTextin interfaceXMLStreamReader- Throws:
XMLStreamException
-
getStableLocation
public Location getStableLocation()
Constructs a new, stableLocationfrom the current stream location. If the stream location implementsStaticLocation, then the stream location will be returned directly.
-
-