public class ResettableXmlEventReader extends ForwardingXmlEventReader
delegate| Constructor and Description | 
|---|
ResettableXmlEventReader(XMLEventReader delegate)  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
getCurrentEventPosition()
Returns an integer which represents the position of the current event in the event stream. 
 | 
String | 
getElementText()  | 
boolean | 
hasNext()  | 
Object | 
next()  | 
XMLEvent | 
nextEvent()  | 
XMLEvent | 
nextTag()  | 
XMLEvent | 
peek()  | 
void | 
remove()  | 
ResettableXmlEventReader | 
reset()
Resets this reader back to its original state before any events have been consumed through methods like  
nextEvent() or next(). | 
void | 
restoreEventPosition(int position)
Moves the pointer of this reader to the specified position. 
 | 
String | 
toString()  | 
close, getPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingpublic ResettableXmlEventReader(XMLEventReader delegate)
public ResettableXmlEventReader reset()
nextEvent() or next().public XMLEvent nextEvent() throws XMLStreamException
nextEvent in interface XMLEventReadernextEvent in class ForwardingXmlEventReaderXMLStreamExceptionpublic boolean hasNext()
hasNext in interface IteratorhasNext in interface XMLEventReaderhasNext in class ForwardingXmlEventReaderpublic XMLEvent peek() throws XMLStreamException
peek in interface XMLEventReaderpeek in class ForwardingXmlEventReaderXMLStreamExceptionpublic int getCurrentEventPosition()
peek() or nextEvent().public void restoreEventPosition(int position)
getCurrentEventPosition(). This method is intended to allow clients
 to move the pointer back to an earlier position in the stream.
 Its not meant for fast forwarding - attempting to set a pointer higher than the number of events read from this reader will just result in stream will be served out as per normal.
position - an integer representing the position of an event in an event streamIllegalArgumentException - if pointer is less than zeropublic String getElementText() throws XMLStreamException
getElementText in interface XMLEventReadergetElementText in class ForwardingXmlEventReaderXMLStreamExceptionpublic XMLEvent nextTag() throws XMLStreamException
nextTag in interface XMLEventReadernextTag in class ForwardingXmlEventReaderXMLStreamExceptionpublic Object next()
next in interface Iteratornext in class ForwardingXmlEventReaderpublic void remove()
remove in interface Iteratorremove in class ForwardingXmlEventReaderCopyright © 2003–2022 Atlassian. All rights reserved.