public class BufferedXMLEventReader extends BaseXMLEventReader
| Constructor and Description |
|---|
BufferedXMLEventReader(XMLEventReader reader)
Create new buffering reader, no buffering is done until
mark(int) is called. |
BufferedXMLEventReader(XMLEventReader reader,
int eventLimit)
Create new buffering reader.
|
| Modifier and Type | Method and Description |
|---|---|
int |
bufferSize() |
void |
close() |
List<XMLEvent> |
getBuffer() |
boolean |
hasNext() |
protected XMLEvent |
internalNextEvent()
Subclass's version of
BaseXMLEventReader.nextEvent(), called by BaseXMLEventReader.next() |
void |
mark()
Same as calling
mark(int) with -1. |
void |
mark(int eventLimit)
Start buffering events
|
XMLEvent |
peek() |
void |
remove()
If reading from the buffer after a
reset() call an IllegalStateException will be thrown. |
void |
reset()
Reset the reader to these start of the buffered events.
|
getElementText, getPreviousEvent, next, nextEvent, nextTaggetParent, getProperty, setParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic BufferedXMLEventReader(XMLEventReader reader)
mark(int) is called.public BufferedXMLEventReader(XMLEventReader reader, int eventLimit)
mark(int) with the specified event limitmark(int)protected XMLEvent internalNextEvent() throws XMLStreamException
BaseXMLEventReaderBaseXMLEventReader.nextEvent(), called by BaseXMLEventReader.next()internalNextEvent in class BaseXMLEventReaderXMLStreamExceptionpublic boolean hasNext()
hasNext in interface IteratorhasNext in interface XMLEventReaderhasNext in class EventReaderDelegatepublic XMLEvent peek() throws XMLStreamException
peek in interface XMLEventReaderpeek in class EventReaderDelegateXMLStreamExceptionpublic void mark()
mark(int) with -1.public void mark(int eventLimit)
eventLimit - the maximum number of events to buffer. -1 will buffer all events, 0 will buffer no events.public void reset()
public void close()
throws XMLStreamException
close in interface XMLEventReaderclose in class EventReaderDelegateXMLStreamExceptionpublic int bufferSize()
public void remove()
reset() call an IllegalStateException will be thrown.remove in interface Iteratorremove in class EventReaderDelegateCopyright © 2017 JBoss by Red Hat. All rights reserved.