Top Fields Constructors Methods
com.sun.xml.fastinfoset.stax.events

public Class StAXFilteredEvent

extends Object
implements XMLEventReader
Class Inheritance
All Implemented Interfaces
javax.xml.stream.XMLEventReader, java.util.Iterator
Imports
javax.xml.stream.events.XMLEvent, .Characters, javax.xml.stream.EventFilter, .XMLStreamException, .XMLEventReader, com.sun.xml.fastinfoset.CommonResourceBundle

Field Summary

Modifier and TypeField and Description
private EventFilter
private XMLEventReader

Constructor Summary

AccessConstructor and Description
public
StAXFilteredEvent()

Creates a new instance of StAXFilteredEvent

public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements javax.xml.stream.XMLEventReader.close.

Frees any resources associated with this Reader.

public String
getElementText()

Implements javax.xml.stream.XMLEventReader.getElementText.

Reads the content of a text-only element.

public Object
getProperty(String name)

Implements javax.xml.stream.XMLEventReader.getProperty.

Get the value of a feature/property from the underlying implementation

public boolean
hasNext()

Implements javax.xml.stream.XMLEventReader.hasNext.

Check if there are more events.

public Object
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public XMLEvent
nextEvent()

Implements javax.xml.stream.XMLEventReader.nextEvent.

Gets the next XMLEvent.

public XMLEvent
nextTag()

Implements javax.xml.stream.XMLEventReader.nextTag.

Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.

public XMLEvent
peek()

Implements javax.xml.stream.XMLEventReader.peek.

Check the next XMLEvent without reading it from the stream.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_filterback to summary
private EventFilter _filter
eventReaderback to summary
private XMLEventReader eventReader

Constructor Detail

StAXFilteredEventback to summary
public StAXFilteredEvent()

Creates a new instance of StAXFilteredEvent

StAXFilteredEventback to summary
public StAXFilteredEvent(XMLEventReader reader, EventFilter filter) throws XMLStreamException

Method Detail

closeback to summary
public void close() throws XMLStreamException

Implements javax.xml.stream.XMLEventReader.close.

Doc from javax.xml.stream.XMLEventReader.close.

Frees any resources associated with this Reader. This method does not close the underlying input source.

Annotations
@Override
Exceptions
XMLStreamException:
if there are errors freeing associated resources
getElementTextback to summary
public String getElementText() throws XMLStreamException

Implements javax.xml.stream.XMLEventReader.getElementText.

Doc from javax.xml.stream.XMLEventReader.getElementText.

Reads the content of a text-only element.

Precondition

the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.

Annotations
@Override
Exceptions
XMLStreamException:
if the current event is not a START_ELEMENT or if a non text element is encountered
getPropertyback to summary
public Object getProperty(String name)

Implements javax.xml.stream.XMLEventReader.getProperty.

Doc from javax.xml.stream.XMLEventReader.getProperty.

Get the value of a feature/property from the underlying implementation

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements javax.xml.stream.XMLEventReader.hasNext.

Doc from javax.xml.stream.XMLEventReader.hasNext.

Check if there are more events. Returns true if there are more events and false otherwise.

Annotations
@Override
nextback to summary
public Object next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Annotations
@Override
nextEventback to summary
public XMLEvent nextEvent() throws XMLStreamException

Implements javax.xml.stream.XMLEventReader.nextEvent.

Doc from javax.xml.stream.XMLEventReader.nextEvent.

Gets the next XMLEvent. The initial event is StartDocument.

Annotations
@Override
Exceptions
XMLStreamException:
if there is an error with the underlying XML.
nextTagback to summary
public XMLEvent nextTag() throws XMLStreamException

Implements javax.xml.stream.XMLEventReader.nextTag.

Doc from javax.xml.stream.XMLEventReader.nextTag.

Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached. If anything other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if the DTD is missing or not interpreted.

Annotations
@Override
Exceptions
XMLStreamException:
if anything other than space characters are encountered
peekback to summary
public XMLEvent peek() throws XMLStreamException

Implements javax.xml.stream.XMLEventReader.peek.

Doc from javax.xml.stream.XMLEventReader.peek.

Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override
setEventReaderback to summary
public void setEventReader(XMLEventReader reader)
setFilterback to summary
public void setFilter(EventFilter filter)