sk.baka.ikslibs.stax
Class STAXEventReaderBase
java.lang.Object
sk.baka.ikslibs.stax.STAXEventReaderBase
- All Implemented Interfaces:
- Iterator, javax.xml.stream.XMLEventReader
public abstract class STAXEventReaderBase
- extends Object
- implements javax.xml.stream.XMLEventReader
Encapsulates basic functionality of the XMLEventReader
interface.
- Author:
- Martin Vysny
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.XMLEventReader |
close, nextEvent, peek |
STAXEventReaderBase
public STAXEventReaderBase()
getCurrentEvent
protected abstract javax.xml.stream.events.XMLEvent getCurrentEvent()
- Returns current event (event returned by the last call to the
XMLEventReader.nextEvent()
).
- Returns:
- current event or
null
if XMLEventReader.nextEvent()
was
not yet called.
getElementText
public String getElementText()
throws javax.xml.stream.XMLStreamException
- Specified by:
getElementText
in interface javax.xml.stream.XMLEventReader
- Throws:
javax.xml.stream.XMLStreamException
checkEventType
protected final void checkEventType(int eventType)
throws javax.xml.stream.XMLStreamException
- Ensures that the current event is of given type.
- Parameters:
eventType
- the event type to enforce over current event.
- Throws:
javax.xml.stream.XMLStreamException
- thrown if current event is not of given type.
getProperty
public Object getProperty(String name)
throws IllegalArgumentException
- Specified by:
getProperty
in interface javax.xml.stream.XMLEventReader
- Throws:
IllegalArgumentException
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
- Specified by:
hasNext
in interface javax.xml.stream.XMLEventReader
nextTag
public javax.xml.stream.events.XMLEvent nextTag()
throws javax.xml.stream.XMLStreamException
- Specified by:
nextTag
in interface javax.xml.stream.XMLEventReader
- Throws:
javax.xml.stream.XMLStreamException
next
public Object next()
- Specified by:
next
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator
Copyright © 2006 Martin Vysny - baka. All Rights Reserved.