public class EventReaderDelegate extends Object implements XMLEventReader
| Constructor and Description |
|---|
EventReaderDelegate()
Constructs an empty filter with no parent set.
|
EventReaderDelegate(XMLEventReader reader)
Constructs an empty filter with the given parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Free any resources associated with this parser.
|
String |
getElementText()
Reads the text context of an element.
|
XMLEventReader |
getParent()
Returns the parent.
|
Object |
getProperty(String name)
Returns the implementation-specific feature or property of the given
name.
|
boolean |
hasNext()
Indicates whether there are more XML events to be read.
|
Object |
next()
Obtain the next element in the collection.
|
XMLEvent |
nextEvent()
Returns the next XML event.
|
XMLEvent |
nextTag()
Returns the next element event.
|
XMLEvent |
peek()
Looks at the next XML event without advancing the cursor in the stream.
|
void |
remove()
Remove from the underlying collection the last element returned by next
(optional operation).
|
void |
setParent(XMLEventReader reader)
Sets the parent.
|
public EventReaderDelegate()
public EventReaderDelegate(XMLEventReader reader)
public void setParent(XMLEventReader reader)
public XMLEventReader getParent()
public XMLEvent nextEvent() throws XMLStreamException
XMLEventReadernextEvent in interface XMLEventReaderXMLStreamExceptionpublic Object next()
Iteratorpublic boolean hasNext()
XMLEventReaderhasNext in interface IteratorhasNext in interface XMLEventReaderpublic XMLEvent peek() throws XMLStreamException
XMLEventReadernull if there are no more events to read.peek in interface XMLEventReaderXMLStreamExceptionpublic String getElementText() throws XMLStreamException
XMLEventReadergetElementText in interface XMLEventReaderXMLStreamExceptionpublic XMLEvent nextTag() throws XMLStreamException
XMLEventReadernextTag in interface XMLEventReaderXMLStreamException - if an event that was not an insignificant
space event was encounteredpublic Object getProperty(String name) throws IllegalArgumentException
XMLEventReadergetProperty in interface XMLEventReaderIllegalArgumentException - if the property is not supportedpublic void close() throws XMLStreamException
XMLEventReaderclose in interface XMLEventReaderXMLStreamException