public class XMLStreamReaderAsync extends XMLStreamEventsAsync
XMLStreamReader: read-only, forward, event based.
The method next() allows to move forward to the next event (such as start element, end element, comment, text...).
It uses UnprotectedString to avoid allocating many character arrays.
Charset is automatically detected by reading the beginning of the XML (either with auto-detection or with the specified encoding).XMLStreamEventsAsync.Next, XMLStreamEventsAsync.ParsingTaskXMLStreamEvents.Attribute, XMLStreamEvents.ElementContext, XMLStreamEvents.Event, XMLStreamEvents.Starterevent| Constructor and Description |
|---|
XMLStreamReaderAsync(IO.Readable io,
Charset defaultEncoding,
int charactersBuffersSize)
Initialize with the given IO.
|
XMLStreamReaderAsync(IO.Readable io,
int charactersBuffersSize)
Constructor, without charset (automatic detection).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaximumCDataSize() |
int |
getMaximumTextSize() |
Pair<Integer,Integer> |
getPosition() |
byte |
getPriority()
Return the priority used for tasks.
|
SynchronizationPoint<Exception> |
next()
Move forward to the next event.
|
void |
setMaximumCDataSize(int max) |
void |
setMaximumTextSize(int max) |
ISynchronizationPoint<Exception> |
start()
Start reading the XML to provide the first event.
|
ISynchronizationPoint<Exception> |
startRootElement()
Shortcut to move forward to the first START_ELEMENT event, skipping the header or comments.
|
closeElement, closeElement, goInto, nextInnerElement, nextInnerElement, nextStartElement, readInnerElementsText, readInnerText, searchElementgetAttributeByFullName, getAttributeByLocalName, getAttributeValueByFullName, getAttributeValueByLocalName, getAttributeValueWithNamespaceURI, getAttributeValueWithPrefix, getAttributeWithNamespaceURI, getAttributeWithPrefix, getNamespaceURI, isSpaceChar, onStartElement, readNamespaces, removeAttributeByFullName, removeAttributeByLocalName, removeAttributeWithNamespaceURI, removeAttributeWithPrefix, resetpublic XMLStreamReaderAsync(IO.Readable io, Charset defaultEncoding, int charactersBuffersSize)
PreBufferedReadable is created.
If the charset is null, it will be automatically detected.public XMLStreamReaderAsync(IO.Readable io, int charactersBuffersSize)
public int getMaximumTextSize()
public void setMaximumTextSize(int max)
public int getMaximumCDataSize()
public void setMaximumCDataSize(int max)
public ISynchronizationPoint<Exception> start()
XMLStreamEventsAsyncstart in class XMLStreamEventsAsyncpublic SynchronizationPoint<Exception> next()
XMLStreamEventsAsyncnext in class XMLStreamEventsAsyncpublic byte getPriority()
XMLStreamEventsAsyncgetPriority in class XMLStreamEventsAsyncpublic ISynchronizationPoint<Exception> startRootElement()
Copyright © 2017. All rights reserved.