DataBuffers.Note
The data buffers should be released via
org.
after they have been consumed. In addition, if using Flux or
Mono operators such as flatMap, reduce, and others that prefetch,
cache, and skip or filter out data items internally, please add
doOnDiscard(DataBuffer.class, DataBufferUtils::release) to the
composition chain to ensure cached data buffers are released prior to an
error or cancellation signal.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canDecode(ResolvableType
the target element type for the output stream elementType, MimeType the mime type associated with the stream to decode
(can be mimeType)null if not specified)Overrides org. Implements org. Whether the decoder supports the given target element type and the MIME type of the source stream. |
| 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)Overrides org. Implements org. Decode a |
| public DataBuffer | decode(DataBuffer
the buffer, ResolvableType DataBuffer to decodethe expected output type elementType, MimeType the MIME type associated with the data mimeType, Map<String, Object> additional information about how to do decode hints)Overrides default org. Decode a data buffer to an Object of type T. |
| DataBufferDecoder | back to summary |
|---|---|
| public DataBufferDecoder() | |
| canDecode | back to summary |
|---|---|
| public boolean canDecode(ResolvableType elementType, MimeType mimeType) Overrides org. Implements org. Doc from org. Whether the decoder supports the given target element type and the MIME type of the source stream.
| |
| decode | back to summary |
|---|---|
| public Flux Overrides org. Implements org. Doc from org. Decode a
| |
| decode | back to summary |
|---|---|
| public DataBuffer decode(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Overrides default org. Doc from org. Decode a data buffer to an Object of type T. This is useful for scenarios, that distinct messages (or events) are decoded and handled individually, in fully aggregated form.
| |