java.lang.Object
com.sun.xml.fastinfoset.stax.events.StAXEventReader
- All Implemented Interfaces:
Iterator<Object>
,XMLEventReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate XMLEvent
protected XMLEventAllocator
protected XMLStreamReader
private int
private XMLEvent[]
private boolean
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Reads the content of a text-only element.getProperty
(String name) Get the value of a feature/property from the underlying implementationboolean
hasNext()
next()
nextTag()
Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached.peek()
void
remove()
void
setAllocator
(XMLEventAllocator allocator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
_streamReader
-
_eventAllocator
-
_currentEvent
-
events
-
size
private int size -
currentIndex
private int currentIndex -
hasEvent
private boolean hasEvent
-
-
Constructor Details
-
StAXEventReader
- Throws:
XMLStreamException
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<Object>
- Specified by:
hasNext
in interfaceXMLEventReader
-
nextEvent
- Specified by:
nextEvent
in interfaceXMLEventReader
- Throws:
XMLStreamException
-
remove
public void remove() -
close
- Specified by:
close
in interfaceXMLEventReader
- Throws:
XMLStreamException
-
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.- Specified by:
getElementText
in interfaceXMLEventReader
- Throws:
XMLStreamException
- if the current event is not a START_ELEMENT or if a non text element is encountered
-
getProperty
Get the value of a feature/property from the underlying implementation- Specified by:
getProperty
in interfaceXMLEventReader
- Parameters:
name
- The name of the property- Returns:
- The value of the property
- Throws:
IllegalArgumentException
- if the property is not supported
-
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.- Specified by:
nextTag
in interfaceXMLEventReader
- Throws:
XMLStreamException
- if anything other than space characters are encountered
-
next
-
peek
- Specified by:
peek
in interfaceXMLEventReader
- Throws:
XMLStreamException
-
setAllocator
-