Decoder implementations that can decode
a DataBuffer directly to the target element type.
Sub-classes must implement decodeDataBuffer to provide a way to
transform a DataBuffer to the target data type. The default
decode implementation transforms each individual data buffer while
decodeToMono applies "reduce" and transforms the aggregated buffer.
Sub-classes can override decode in order to split the input stream
along different boundaries (e.g. on new line characters for String)
or always reduce to a single data buffer (e.g. Resource).
| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| protected |
| 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. Decode a |
| protected T | decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints)
Deprecated
as of 5.2, please implement
decode(DataBuffer, ResolvableType, MimeType, Map) instead
How to decode a |
| public Mono | decodeToMono(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 int | |
| public void | setMaxInMemorySize(int
the max number of bytes to buffer, or -1 for unlimited byteCount)Configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated. |
| maxInMemorySize | back to summary |
|---|---|
| private int maxInMemorySize | |
| AbstractDataBufferDecoder | back to summary |
|---|---|
| protected AbstractDataBufferDecoder(MimeType... supportedMimeTypes) | |
| decode | back to summary |
|---|---|
| public Flux Implements org. Doc from org. Decode a
| |
| decodeDataBuffer | back to summary |
|---|---|
| protected T decodeDataBuffer(DataBuffer buffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints)
Deprecated as of 5.2, please implement
How to decode a
| |
| decodeToMono | back to summary |
|---|---|
| public Mono Overrides org. 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) Configure a limit on the number of bytes that can be buffered whenever
the input stream needs to be aggregated. This can be a result of
decoding to a single By default this is set to 256K.
| |