Package org.springframework.core.codec

# Class Netty5BufferDecoder

java.lang.Object
org.springframework.core.codec.AbstractDecoder<T>
org.springframework.core.codec.AbstractDataBufferDecoder<io.netty5.buffer.Buffer>
org.springframework.core.codec.Netty5BufferDecoder

All Implemented Interfaces:
  `Decoder<io.netty5.buffer.Buffer>`

public class Netty5BufferDecoder extends AbstractDataBufferDecoder<io.netty5.buffer.Buffer>
Decoder for `Buffers`.

Since:
  6.0
Author:
  Violeta Georgieva

## Field Summary

### Fields inherited from class org.springframework.core.codec.AbstractDecoder

`logger`

## Constructor Summary

Constructors
Constructor
Description
`Netty5BufferDecoder()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`canDecode(ResolvableType elementType, MimeType mimeType)`
Whether the decoder supports the given target element type and the MIME type of the source stream.
`io.netty5.buffer.Buffer`
`decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)`
Decode a data buffer to an Object of type T.

### Methods inherited from class org.springframework.core.codec.AbstractDataBufferDecoder

`decode, decodeDataBuffer, decodeToMono, getMaxInMemorySize, setMaxInMemorySize`

### Methods inherited from class org.springframework.core.codec.AbstractDecoder

`getDecodableMimeTypes, getLogger, setLogger`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.core.codec.Decoder

`getDecodableMimeTypes`

## Constructor Details

### Netty5BufferDecoder

public Netty5BufferDecoder()

## Method Details

### canDecode

public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
Description copied from interface: `Decoder`
Whether the decoder supports the given target element type and the MIME type of the source stream.

Specified by:
  `canDecode` in interface `Decoder<io.netty5.buffer.Buffer>`
Overrides:
  `canDecode` in class `AbstractDecoder<io.netty5.buffer.Buffer>`
Parameters:
  `elementType` - the target element type for the output stream
  `mimeType` - the mime type associated with the stream to decode (can be `null` if not specified)
Returns:
  `true` if supported, `false` otherwise

### decode

public io.netty5.buffer.Buffer decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
Description copied from interface: `Decoder`
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` - the `DataBuffer` to decode
  `elementType` - the expected output type
  `mimeType` - the MIME type associated with the data
  `hints` - additional information about how to do decode
Returns:
  the decoded value, possibly `null`