public class EventReaderDelegate extends Object implements XMLEventReader
XMLEventReader,
StreamReaderDelegate| Constructor and Description |
|---|
EventReaderDelegate()
Construct an empty filter with no parent.
|
EventReaderDelegate(XMLEventReader reader)
Construct an filter with the specified parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Frees any resources associated with this Reader.
|
String |
getElementText()
Reads the content of a text-only element.
|
XMLEventReader |
getParent()
Get the parent of this instance.
|
Object |
getProperty(String name)
Get the value of a feature/property from the underlying implementation
|
boolean |
hasNext()
Check if there are more events.
|
Object |
next()
Returns the next element in the iteration.
|
XMLEvent |
nextEvent()
Get the next XMLEvent
|
XMLEvent |
nextTag()
Skips any insignificant space events until a START_ELEMENT or
END_ELEMENT is reached.
|
XMLEvent |
peek()
Check the next XMLEvent without reading it from the stream.
|
void |
remove()
Removes from the underlying collection the last element returned
by this iterator (optional operation).
|
void |
setParent(XMLEventReader reader)
Set the parent of this instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic EventReaderDelegate()
public EventReaderDelegate(XMLEventReader reader)
reader - the parentpublic void setParent(XMLEventReader reader)
reader - the new parentpublic XMLEventReader getParent()
public XMLEvent nextEvent() throws XMLStreamException
XMLEventReadernextEvent in interface XMLEventReaderXMLStreamException - if there is an error with the underlying XML.XMLEventpublic Object next()
Iteratorpublic boolean hasNext()
XMLEventReaderhasNext in interface IteratorhasNext in interface XMLEventReaderpublic XMLEvent peek() throws XMLStreamException
XMLEventReaderpeek in interface XMLEventReaderXMLStreamExceptionXMLEventpublic void close()
throws XMLStreamException
XMLEventReaderclose in interface XMLEventReaderXMLStreamException - if there are errors freeing associated resourcespublic String getElementText() throws XMLStreamException
XMLEventReadergetElementText in interface XMLEventReaderXMLStreamException - if the current event is not a START_ELEMENT
or if a non text element is encounteredpublic XMLEvent nextTag() throws XMLStreamException
XMLEventReadernextTag in interface XMLEventReaderXMLStreamException - if anything other than space characters are encounteredpublic Object getProperty(String name) throws IllegalArgumentException
XMLEventReadergetProperty in interface XMLEventReadername - The name of the propertyIllegalArgumentException - if the property is not supportedpublic void remove()
IteratorIterator.next(). The behavior of an iterator
is unspecified if the underlying collection is modified while the
iteration is in progress in any way other than by calling this
method. Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.