public class EventReaderDelegate extends java.lang.Object implements javax.xml.stream.XMLEventReader
| Constructor and Description |
|---|
EventReaderDelegate()
Constructs an empty filter with no parent set.
|
EventReaderDelegate(javax.xml.stream.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.
|
java.lang.String |
getElementText()
Reads the text context of an element.
|
javax.xml.stream.XMLEventReader |
getParent()
Returns the parent.
|
java.lang.Object |
getProperty(java.lang.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.
|
java.lang.Object |
next()
Obtain the next element in the collection.
|
javax.xml.stream.events.XMLEvent |
nextEvent()
Returns the next XML event.
|
javax.xml.stream.events.XMLEvent |
nextTag()
Returns the next element event.
|
javax.xml.stream.events.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(javax.xml.stream.XMLEventReader reader)
Sets the parent.
|
public EventReaderDelegate()
public EventReaderDelegate(javax.xml.stream.XMLEventReader reader)
public void setParent(javax.xml.stream.XMLEventReader reader)
public javax.xml.stream.XMLEventReader getParent()
public javax.xml.stream.events.XMLEvent nextEvent() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLEventReadernextEvent in interface javax.xml.stream.XMLEventReaderjavax.xml.stream.XMLStreamExceptionpublic java.lang.Object next()
java.util.Iteratornext in interface java.util.Iteratorpublic boolean hasNext()
javax.xml.stream.XMLEventReaderhasNext in interface java.util.IteratorhasNext in interface javax.xml.stream.XMLEventReaderpublic javax.xml.stream.events.XMLEvent peek() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLEventReadernull if there are no more events to read.peek in interface javax.xml.stream.XMLEventReaderjavax.xml.stream.XMLStreamExceptionpublic java.lang.String getElementText() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLEventReadergetElementText in interface javax.xml.stream.XMLEventReaderjavax.xml.stream.XMLStreamExceptionpublic javax.xml.stream.events.XMLEvent nextTag() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLEventReadernextTag in interface javax.xml.stream.XMLEventReaderjavax.xml.stream.XMLStreamException - if an event that was not an insignificant
space event was encounteredpublic java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException
javax.xml.stream.XMLEventReadergetProperty in interface javax.xml.stream.XMLEventReaderjava.lang.IllegalArgumentException - if the property is not supportedpublic void close() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLEventReaderclose in interface javax.xml.stream.XMLEventReaderjavax.xml.stream.XMLStreamExceptionpublic void remove()
java.util.Iteratornext(). It does not affect what will be returned
by subsequent calls to next.remove in interface java.util.Iterator