## javanet.staxutils
Class XMLStreamEventReader

    java.lang.Object
      javanet.staxutils.XMLStreamEventReader

All Implemented Interfaces:
  Iterator, XMLEventReader

    public class XMLStreamEventReader

extends Object
implements XMLEventReader

`XMLEventReader` implementation based on a `XMLStreamReader` and an `XMLEventAllocator`.

Version:
  $Revision: 1.3 $
Author:
  Christian Niles

Constructor Summary
`XMLStreamEventReader(XMLStreamReader reader)`
`XMLStreamEventReader(XMLStreamReader reader, XMLEventAllocator allocator)`

Method Summary
`protected XMLEvent` `allocateEvent()` Reads the next event from the underlying reader.
`void` `close()`
`String` `getElementText()`
`Object` `getProperty(String name)` No properties are supported, so this always throws `IllegalArgumentException`.
`boolean` `hasNext()`
`Object` `next()`
`XMLEvent` `nextEvent()`
`XMLEvent` `nextTag()`
`XMLEvent` `peek()`
`void` `remove()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLStreamEventReader

    public XMLStreamEventReader(XMLStreamReader reader)

### XMLStreamEventReader

    public XMLStreamEventReader(XMLStreamReader reader,
                                XMLEventAllocator allocator)

Method Detail

### getProperty

    public Object getProperty(String name)
                       throws IllegalArgumentException

  No properties are supported, so this always throws `IllegalArgumentException`.

  Specified by:
    `getProperty` in interface `XMLEventReader`
  Throws:
    `IllegalArgumentException`

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `Iterator`
  Specified by:
    `hasNext` in interface `XMLEventReader`

### nextTag

    public XMLEvent nextTag()
                     throws XMLStreamException

  Specified by:
    `nextTag` in interface `XMLEventReader`
  Throws:
    `XMLStreamException`

### getElementText

    public String getElementText()
                          throws XMLStreamException

  Specified by:
    `getElementText` in interface `XMLEventReader`
  Throws:
    `XMLStreamException`

### nextEvent

    public XMLEvent nextEvent()
                       throws XMLStreamException

  Specified by:
    `nextEvent` in interface `XMLEventReader`
  Throws:
    `XMLStreamException`

### peek

    public XMLEvent peek()
                  throws XMLStreamException

  Specified by:
    `peek` in interface `XMLEventReader`
  Throws:
    `XMLStreamException`

### next

    public Object next()

  Specified by:
    `next` in interface `Iterator`

### remove

    public void remove()

  Specified by:
    `remove` in interface `Iterator`

### close

    public void close()
               throws XMLStreamException

  Specified by:
    `close` in interface `XMLEventReader`
  Throws:
    `XMLStreamException`

### allocateEvent

    protected XMLEvent allocateEvent()
                              throws XMLStreamException

  Reads the next event from the underlying reader.

  Returns:
    The allocated `XMLEvent`.
  Throws:
    `XMLStreamException` - If an error occurs reading the underlying stream.