Top Description Constructors Methods
org.springframework.core.codec

public Class Netty5BufferDecoder

extends AbstractDataBufferDecoder<Buffer>
Class Inheritance
Imports
java.util.Map, io.netty5.buffer.Buffer, .DefaultBufferAllocators, org.springframework.core.ResolvableType, org.springframework.core.io.buffer.DataBuffer, .DataBufferUtils, .Netty5DataBuffer, org.springframework.lang.Nullable, org.springframework.util.MimeType, .MimeTypeUtils

Decoder for Buffers.
Author
Violeta Georgieva
Since
6.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod 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 null if not specified)
mimeType
)

Overrides org.springframework.core.codec.AbstractDecoder.canDecode.

Implements org.springframework.core.codec.Decoder.canDecode.

Whether the decoder supports the given target element type and the MIME type of the source stream.
public Buffer
decode(DataBuffer
the DataBuffer to decode
dataBuffer
,
ResolvableType
the 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.springframework.core.codec.Decoder.decode.

Decode a data buffer to an Object of type T.
Inherited from org.springframework.core.codec.AbstractDataBufferDecoder:
decodedecodeDataBufferdecodeToMonogetMaxInMemorySizesetMaxInMemorySize

Constructor Detail

Netty5BufferDecoderback to summary
public Netty5BufferDecoder()

Method Detail

canDecodeback to summary
public boolean canDecode(ResolvableType elementType, MimeType mimeType)

Overrides org.springframework.core.codec.AbstractDecoder.canDecode.

Implements org.springframework.core.codec.Decoder.canDecode.

Doc from org.springframework.core.codec.Decoder.canDecode.

Whether the decoder supports the given target element type and the MIME type of the source stream.

Parameters
elementType:ResolvableType

the target element type for the output stream

mimeType:MimeType

the mime type associated with the stream to decode (can be null if not specified)

Returns:boolean

true if supported, false otherwise

Annotations
@Override
decodeback to summary
public Buffer decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints)

Overrides default org.springframework.core.codec.Decoder.decode.

Doc from org.springframework.core.codec.Decoder.decode.

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.

Parameters
dataBuffer:DataBuffer

the DataBuffer to decode

elementType:ResolvableType

the expected output type

mimeType:MimeType

the MIME type associated with the data

hints:Map<String, Object>

additional information about how to do decode

Returns:Buffer

the decoded value, possibly null

Annotations
@Override