com.sun.xml.fastinfoset.stax.events
Class StAXEventReader
java.lang.Object
com.sun.xml.fastinfoset.stax.events.StAXEventReader
- All Implemented Interfaces:
- Iterator, XMLEventReader
public class StAXEventReader
- extends Object
- implements XMLEventReader
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_streamReader
protected XMLStreamReader _streamReader
_eventAllocator
protected XMLEventAllocator _eventAllocator
StAXEventReader
public StAXEventReader(XMLStreamReader reader)
throws XMLStreamException
- Throws:
XMLStreamException
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator- Specified by:
hasNext in interface XMLEventReader
nextEvent
public XMLEvent nextEvent()
throws XMLStreamException
- Specified by:
nextEvent in interface XMLEventReader
- Throws:
XMLStreamException
remove
public void remove()
- Specified by:
remove in interface Iterator
close
public void close()
throws XMLStreamException
- Specified by:
close in interface XMLEventReader
- Throws:
XMLStreamException
getElementText
public String getElementText()
throws XMLStreamException
- Reads the content of a text-only element. Precondition:
the current event is START_ELEMENT. Postcondition:
The current event is the corresponding END_ELEMENT.
- Specified by:
getElementText in interface XMLEventReader
- Throws:
XMLStreamException - if the current event is not a START_ELEMENT
or if a non text element is encountered
getProperty
public Object getProperty(String name)
throws IllegalArgumentException
- Get the value of a feature/property from the underlying implementation
- Specified by:
getProperty in interface XMLEventReader
- Parameters:
name - The name of the property
- Returns:
- The value of the property
- Throws:
IllegalArgumentException - if the property is not supported
nextTag
public XMLEvent nextTag()
throws XMLStreamException
- 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.
- Specified by:
nextTag in interface XMLEventReader
- Throws:
XMLStreamException - if anything other than space characters are encountered
next
public Object next()
- Specified by:
next in interface Iterator
peek
public XMLEvent peek()
throws XMLStreamException
- Specified by:
peek in interface XMLEventReader
- Throws:
XMLStreamException
setAllocator
public void setAllocator(XMLEventAllocator allocator)
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.