public abstract class FilteringXMLEventReader extends BaseXMLEventReader
XMLEventReader
s that want to modify or remove events from the reader stream.
If a StartElement
event is removed the subclass's filterEvent(javax.xml.stream.events.XMLEvent, boolean)
will
not see any events until after the matching EndElement
event.
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/FilteringXMLEventReader.javaConstructor and Description |
---|
FilteringXMLEventReader(XMLEventReader reader) |
Modifier and Type | Method and Description |
---|---|
protected abstract XMLEvent |
filterEvent(XMLEvent event,
boolean peek) |
boolean |
hasNext() |
protected XMLEvent |
internalNext(boolean peek) |
protected XMLEvent |
internalNextEvent()
Subclass's version of
BaseXMLEventReader.nextEvent() , called by BaseXMLEventReader.next() |
XMLEvent |
peek() |
getElementText, getPreviousEvent, next, nextEvent, nextTag
close, getParent, getProperty, remove, setParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public FilteringXMLEventReader(XMLEventReader reader)
protected final XMLEvent internalNextEvent() throws XMLStreamException
BaseXMLEventReader
BaseXMLEventReader.nextEvent()
, called by BaseXMLEventReader.next()
internalNextEvent
in class BaseXMLEventReader
XMLStreamException
public boolean hasNext()
hasNext
in interface Iterator
hasNext
in interface XMLEventReader
hasNext
in class EventReaderDelegate
public final XMLEvent peek() throws XMLStreamException
peek
in interface XMLEventReader
peek
in class EventReaderDelegate
XMLStreamException
protected final XMLEvent internalNext(boolean peek) throws XMLStreamException
XMLStreamException
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.