Class ByteBufferDecoder
java.lang.Object
org.springframework.core.codec.AbstractDecoder<ByteBuffer>
org.springframework.core.codec.AbstractDataBufferDecoder<ByteBuffer>
org.springframework.core.codec.ByteBufferDecoder
- All Implemented Interfaces:
- Decoder<ByteBuffer>
Decoder for 
ByteBuffers.- Since:
- 5.0
- Author:
- Sebastien Deleuze, Arjen Poutsma, Rossen Stoyanchev
- 
Field SummaryFields inherited from class org.springframework.core.codec.AbstractDecoderlogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanDecode(ResolvableType elementType, @Nullable MimeType mimeType) Whether the decoder supports the given target element type and the MIME type of the source stream.decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Decode a data buffer to an Object of type T.Methods inherited from class org.springframework.core.codec.AbstractDataBufferDecoderdecode, decodeDataBuffer, decodeToMono, getMaxInMemorySize, setMaxInMemorySizeMethods inherited from class org.springframework.core.codec.AbstractDecodergetDecodableMimeTypes, getLogger, setLoggerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.codec.DecodergetDecodableMimeTypes
- 
Constructor Details- 
ByteBufferDecoderpublic ByteBufferDecoder()
 
- 
- 
Method Details- 
canDecodeDescription copied from interface:DecoderWhether the decoder supports the given target element type and the MIME type of the source stream.- Specified by:
- canDecodein interface- Decoder<ByteBuffer>
- Overrides:
- canDecodein class- AbstractDecoder<ByteBuffer>
- Parameters:
- elementType- the target element type for the output stream
- mimeType- the mime type associated with the stream to decode (can be- nullif not specified)
- Returns:
- trueif supported,- falseotherwise
 
- 
decodepublic ByteBuffer decode(DataBuffer dataBuffer, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Description copied from interface:DecoderDecode 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- DataBufferto 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
 
 
-