Top Fields Constructors Methods
com.sun.xml.internal.stream

public Class EventFilterSupport

extends EventReaderDelegate
Class Inheritance
Imports
java.util.NoSuchElementException, javax.xml.stream.EventFilter, .XMLEventReader, .XMLStreamException, javax.xml.stream.events.XMLEvent, javax.xml.stream.util.EventReaderDelegate

Author
Neeraj Bajaj, Sun Microsystems

Field Summary

Modifier and TypeField and Description
pack-priv EventFilter

Constructor Summary

AccessConstructor and Description
public
EventFilterSupport(XMLEventReader eventReader, EventFilter eventFilter)

Creates a new instance of EventFilterSupport

Method Summary

Modifier and TypeMethod and Description
public boolean
public Object
next()

Overrides javax.xml.stream.util.EventReaderDelegate.next.

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public XMLEvent
public XMLEvent
nextTag()

Overrides javax.xml.stream.util.EventReaderDelegate.nextTag.

Implements javax.xml.stream.XMLEventReader.nextTag.

Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.
public XMLEvent
peek()

Overrides javax.xml.stream.util.EventReaderDelegate.peek.

Implements javax.xml.stream.XMLEventReader.peek.

Check the next XMLEvent without reading it from the stream.
Inherited from javax.xml.stream.util.EventReaderDelegate:
closegetElementTextgetParentgetPropertyremovesetParent

Field Detail

fEventFilterback to summary
pack-priv EventFilter fEventFilter

Constructor Detail

EventFilterSupportback to summary
public EventFilterSupport(XMLEventReader eventReader, EventFilter eventFilter)

Creates a new instance of EventFilterSupport

Method Detail

hasNextback to summary
public boolean hasNext()

Overrides javax.xml.stream.util.EventReaderDelegate.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.

Returns:boolean

true if the event reader has more events, false otherwise

nextback to summary
public Object next()

Overrides javax.xml.stream.util.EventReaderDelegate.next.

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Object

the next element in the iteration

nextEventback to summary
public XMLEvent nextEvent() throws XMLStreamException

Overrides javax.xml.stream.util.EventReaderDelegate.nextEvent.

Implements javax.xml.stream.XMLEventReader.nextEvent.

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

Gets the next XMLEvent. The initial event is StartDocument.

Returns:XMLEvent

the next XMLEvent

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

Overrides javax.xml.stream.util.EventReaderDelegate.nextTag.

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.

Returns:XMLEvent

a START_ELEMENT or END_ELEMENT

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

Overrides javax.xml.stream.util.EventReaderDelegate.peek.

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().

Returns:XMLEvent

the next XMLEvent

Exceptions
XMLStreamException:
if an error occurs