javax.xml.stream.util
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
XMLEventReader
nextEvent
in interface XMLEventReader
XMLStreamException
public Object next()
Iterator
public boolean hasNext()
XMLEventReader
hasNext
in interface Iterator
hasNext
in interface XMLEventReader
public XMLEvent peek() throws XMLStreamException
XMLEventReader
null
if there are no more events to read.peek
in interface XMLEventReader
XMLStreamException
public String getElementText() throws XMLStreamException
XMLEventReader
getElementText
in interface XMLEventReader
XMLStreamException
public XMLEvent nextTag() throws XMLStreamException
XMLEventReader
nextTag
in interface XMLEventReader
XMLStreamException
- if an event that was not an insignificant
space event was encounteredpublic Object getProperty(String name) throws IllegalArgumentException
XMLEventReader
getProperty
in interface XMLEventReader
IllegalArgumentException
- if the property is not supportedpublic void close() throws XMLStreamException
XMLEventReader
close
in interface XMLEventReader
XMLStreamException