|
Java™ Platform Standard Ed. 6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.stream.util.EventReaderDelegate
public class EventReaderDelegate
This is the base class for deriving an XMLEventReader filter. This class is designed to sit between an XMLEventReader and an application's XMLEventReader. By default each method does nothing but call the corresponding method on the parent interface.
XMLEventReader,
StreamReaderDelegate| Constructor Summary | |
|---|---|
EventReaderDelegate()
Construct an empty filter with no parent. |
|
EventReaderDelegate(XMLEventReader reader)
Construct an filter with the specified parent. |
|
| Method Summary | |
|---|---|
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 the iterator (optional operation). |
void |
setParent(XMLEventReader reader)
Set the parent of this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventReaderDelegate()
public EventReaderDelegate(XMLEventReader reader)
reader - the parent| Method Detail |
|---|
public void setParent(XMLEventReader reader)
reader - the new parentpublic XMLEventReader getParent()
public XMLEvent nextEvent()
throws XMLStreamException
XMLEventReader
nextEvent in interface XMLEventReaderXMLStreamException - if there is an error with the underlying XML.XMLEventpublic Object next()
Iterator
next in interface Iteratorpublic boolean hasNext()
XMLEventReader
hasNext in interface IteratorhasNext in interface XMLEventReader
public XMLEvent peek()
throws XMLStreamException
XMLEventReader
peek in interface XMLEventReaderXMLStreamExceptionXMLEvent
public void close()
throws XMLStreamException
XMLEventReader
close in interface XMLEventReaderXMLStreamException - if there are errors freeing associated resources
public String getElementText()
throws XMLStreamException
XMLEventReader
getElementText in interface XMLEventReaderXMLStreamException - if the current event is not a START_ELEMENT
or if a non text element is encountered
public XMLEvent nextTag()
throws XMLStreamException
XMLEventReader
nextTag in interface XMLEventReaderXMLStreamException - if anything other than space characters are encountered
public Object getProperty(String name)
throws IllegalArgumentException
XMLEventReader
getProperty in interface XMLEventReadername - The name of the property
IllegalArgumentException - if the property is not supportedpublic void remove()
Iterator
remove in interface Iterator
|
Java™ Platform Standard Ed. 6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.