com.ctc.wstx.evt
Class FilteredEventReader

java.lang.Object
  extended bycom.ctc.wstx.evt.FilteredEventReader
All Implemented Interfaces:
java.util.Iterator, javax.xml.stream.XMLEventReader, javax.xml.stream.XMLStreamConstants

public class FilteredEventReader
extends java.lang.Object
implements javax.xml.stream.XMLEventReader, javax.xml.stream.XMLStreamConstants

Some notes about implemention:


Field Summary
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
FilteredEventReader(javax.xml.stream.XMLEventReader r, javax.xml.stream.EventFilter f)
           
 
Method Summary
 void close()
           
 java.lang.String getElementText()
           
 java.lang.Object getProperty(java.lang.String name)
           
 boolean hasNext()
           
 java.lang.Object next()
           
 javax.xml.stream.events.XMLEvent nextEvent()
           
 javax.xml.stream.events.XMLEvent nextTag()
           
 javax.xml.stream.events.XMLEvent peek()
          Note: there is no way to do any filtering here; will simply dispatch the call to the underlying reader.
 void remove()
          Note: only here because we implement Iterator interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredEventReader

public FilteredEventReader(javax.xml.stream.XMLEventReader r,
                           javax.xml.stream.EventFilter f)
Method Detail

close

public void close()
           throws javax.xml.stream.XMLStreamException
Specified by:
close in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

getElementText

public java.lang.String getElementText()
                                throws javax.xml.stream.XMLStreamException
Specified by:
getElementText in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface javax.xml.stream.XMLEventReader

hasNext

public boolean hasNext()
Specified by:
hasNext in interface javax.xml.stream.XMLEventReader

nextEvent

public javax.xml.stream.events.XMLEvent nextEvent()
                                           throws javax.xml.stream.XMLStreamException
Specified by:
nextEvent in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

nextTag

public javax.xml.stream.events.XMLEvent nextTag()
                                         throws javax.xml.stream.XMLStreamException
Specified by:
nextTag in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

peek

public javax.xml.stream.events.XMLEvent peek()
                                      throws javax.xml.stream.XMLStreamException
Note: there is no way to do any filtering here; will simply dispatch the call to the underlying reader.

Specified by:
peek in interface javax.xml.stream.XMLEventReader
Throws:
javax.xml.stream.XMLStreamException

remove

public void remove()
Note: only here because we implement Iterator interface

Specified by:
remove in interface java.util.Iterator