public abstract class BaseXMLEventReader extends EventReaderDelegate
getElementText()
and nextTag()
APIs in a
way that is agnostic from the rest of the XMLEventReader implementation. Both will use the subclasses
internalNextEvent()
as the exclusive way to read events.
Note, copied from the uPortal project by permission of author. See
https://github.com/Jasig/uPortal/blob/master/uportal-war/src/main/java/org/jasig/portal/xml/stream/BaseXMLEventReader.javaConstructor and Description |
---|
BaseXMLEventReader(XMLEventReader reader) |
Modifier and Type | Method and Description |
---|---|
String |
getElementText() |
protected XMLEvent |
getPreviousEvent() |
protected abstract XMLEvent |
internalNextEvent()
Subclass's version of
nextEvent() , called by next() |
Object |
next() |
XMLEvent |
nextEvent() |
XMLEvent |
nextTag() |
close, getParent, getProperty, hasNext, peek, remove, setParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public BaseXMLEventReader(XMLEventReader reader)
protected abstract XMLEvent internalNextEvent() throws XMLStreamException
nextEvent()
, called by next()
XMLStreamException
protected final XMLEvent getPreviousEvent()
internalNextEvent()
public final XMLEvent nextEvent() throws XMLStreamException
nextEvent
in interface XMLEventReader
nextEvent
in class EventReaderDelegate
XMLStreamException
public final Object next()
next
in interface Iterator
next
in class EventReaderDelegate
public final String getElementText() throws XMLStreamException
getElementText
in interface XMLEventReader
getElementText
in class EventReaderDelegate
XMLStreamException
public final XMLEvent nextTag() throws XMLStreamException
nextTag
in interface XMLEventReader
nextTag
in class EventReaderDelegate
XMLStreamException
Copyright © 2016 JBoss by Red Hat. All rights reserved.