public class XmlEventDecoder extends AbstractDecoder<javax.xml.stream.events.XMLEvent>
DataBuffer
stream into a stream of XMLEvent
s. That is, given
the following XML:
<root>
<child>foo</child>
<child>bar</child>
</root>
this method with result in a flux with the following events:
StartDocument
StartElement
root
StartElement
child
Characters
foo
EndElement
child
StartElement
child
Characters
bar
EndElement
child
EndElement
root
Modifier and Type | Class and Description |
---|---|
private static class |
XmlEventDecoder.AaltoDataBufferToXmlEvent |
Modifier and Type | Field and Description |
---|---|
private static boolean |
aaltoPresent |
private static javax.xml.stream.XMLInputFactory |
inputFactory |
(package private) boolean |
useAalto |
Constructor and Description |
---|
XmlEventDecoder() |
Modifier and Type | Method and Description |
---|---|
<any> |
decode(<any> inputStream,
ResolvableType elementType,
MimeType mimeType,
java.util.Map<java.lang.String,java.lang.Object> hints)
Decode a
DataBuffer input stream into a Flux of T . |
canDecode, decodeToMono, getDecodableMimeTypes
private static final boolean aaltoPresent
private static final javax.xml.stream.XMLInputFactory inputFactory
boolean useAalto
public <any> decode(<any> inputStream, ResolvableType elementType, MimeType mimeType, java.util.Map<java.lang.String,java.lang.Object> hints)
Decoder
DataBuffer
input stream into a Flux of T
.inputStream
- the DataBuffer
input stream to decodeelementType
- the expected type of elements in the output stream;
this type must have been previously passed to the Decoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true
.mimeType
- the MIME type associated with the input stream, optionalhints
- additional information about how to do encode