## 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

Field Summary
`protected String` `encoding` The stream encoding.
`protected String` `systemId` The 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
`BaseXMLStreamReader()`
`BaseXMLStreamReader(String systemId, String encoding)`

Method Summary
`String` `getAttributeLocalName(int index)`
`String` `getAttributeNamespace(int index)`
`String` `getAttributePrefix(int index)`
`String` `getElementText()`
`String` `getEncoding()`
`String` `getEventTypeName()` Returns the name of the current event type.
`String` `getNamespaceURI()`
`String` `getNamespaceURI(String prefix)`
`String` `getPrefix()`
`Location` `getStableLocation()` Constructs a new, stable `Location` from the current stream location.
`String` `getSystemId()`
`boolean` `hasName()`
`boolean` `hasText()`
`boolean` `isCharacters()`
`boolean` `isEndElement()`
`boolean` `isStartElement()`
`boolean` `isWhiteSpace()`
`int` `nextTag()`
`void` `require(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`

Field Detail

### systemId

    protected String systemId

  The stream system ID.

### encoding

    protected String encoding

  The stream encoding.

Constructor Detail

### BaseXMLStreamReader

    public BaseXMLStreamReader()

### BaseXMLStreamReader

    public BaseXMLStreamReader(String systemId,
                               String encoding)

Method Detail

### 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.