DataBuffer stream into a stream of XMLEvents.
Given the following XML:
<root>
<child>foo</child>
<child>bar</child>
</root>
this decoder will produce a Flux with the following events:
javax.xml.stream.events.StartDocument javax.xml.stream.events.StartElement rootjavax.xml.stream.events.StartElement childjavax.xml.stream.events.Characters foojavax.xml.stream.events.EndElement childjavax.xml.stream.events.StartElement childjavax.xml.stream.events.Characters barjavax.xml.stream.events.EndElement childjavax.xml.stream.events.EndElement rootNote that this decoder is not registered by default but is used internally by other decoders which are registered by default.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| private static final XMLInputFactory | |
| private int | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Flux | decode(Publisher<DataBuffer>
the input, ResolvableType DataBuffer input stream to decodethe expected type of elements in the output stream;
this type must have been previously passed to the elementType, MimeType canDecode
method and it must have returned true.the MIME type associated with the input stream (optional) mimeType, Map<String, Object> additional information about how to do decode hints)Implements org. DataBuffer input stream into a Flux of T.
|
| public int | |
| public void | setMaxInMemorySize(int
the max number of bytes to buffer, or -1 for unlimited byteCount)Set the max number of bytes that can be buffered by this decoder. |
| aaltoPresent | back to summary |
|---|---|
| private static final boolean aaltoPresent | |
| inputFactory | back to summary |
|---|---|
| private static final XMLInputFactory inputFactory | |
| maxInMemorySize | back to summary |
|---|---|
| private int maxInMemorySize | |
| useAalto | back to summary |
|---|---|
| pack-priv boolean useAalto | |
| XmlEventDecoder | back to summary |
|---|---|
| public XmlEventDecoder() | |
| decode | back to summary |
|---|---|
| public Flux Implements org. Doc from org. Decode a
| |
| getMaxInMemorySize | back to summary |
|---|---|
| public int getMaxInMemorySize() Return the
| |
| setMaxInMemorySize | back to summary |
|---|---|
| public void setMaxInMemorySize(int byteCount) Set the max number of bytes that can be buffered by this decoder. This
is either the size the entire input when decoding as a whole, or when
using async parsing via Aalto XML, it is size one top-level XML tree.
When the limit is exceeded, By default this is set to 256K.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private final XMLEventAllocator | |
| private static final AsyncXMLInputFactory | |
| private final int | |
| private final AsyncXMLStreamReader |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public List | apply(DataBuffer
the function argument dataBuffer)Implements java. |
| private void | |
| public void | |
| private void | |
| private void |
| byteCount | back to summary |
|---|---|
| private int byteCount | |
| elementDepth | back to summary |
|---|---|
| private int elementDepth | |
| eventAllocator | back to summary |
|---|---|
| private final XMLEventAllocator eventAllocator | |
| inputFactory | back to summary |
|---|---|
| private static final AsyncXMLInputFactory inputFactory | |
| maxInMemorySize | back to summary |
|---|---|
| private final int maxInMemorySize | |
| streamReader | back to summary |
|---|---|
| private final AsyncXMLStreamReader<AsyncByteBufferFeeder> streamReader | |
| AaltoDataBufferToXmlEvent | back to summary |
|---|---|
| public AaltoDataBufferToXmlEvent(int maxInMemorySize) | |
| apply | back to summary |
|---|---|
| public List Implements java. Doc from java. Applies this function to the given argument.
| |
| checkDepthAndResetByteCount | back to summary |
|---|---|
| private void checkDepthAndResetByteCount(XMLEvent event) | |
| endOfInput | back to summary |
|---|---|
| public void endOfInput() | |
| increaseByteCount | back to summary |
|---|---|
| private void increaseByteCount(DataBuffer dataBuffer) | |
| raiseLimitException | back to summary |
|---|---|
| private void raiseLimitException() | |