Class Jackson2CborDecoder
- java.lang.Object
- org.springframework.http.codec.json.Jackson2CodecSupport
- org.springframework.http.codec.json.AbstractJackson2Decoder
- org.springframework.http.codec.cbor.Jackson2CborDecoder
- All Implemented Interfaces:
Decoder<Object>
,HttpMessageDecoder<Object>
public class Jackson2CborDecoder extends AbstractJackson2Decoder
Decode bytes into CBOR and convert to Object's with Jackson. Stream decoding is not supported yet.- Since:
- 5.2
- Author:
- Sebastien Deleuze
- See Also:
Jackson2CborEncoder
, Add CBOR support to WebFlux
Field Summary
Fields inherited from class org.springframework.http.codec.json.Jackson2CodecSupport
JSON_VIEW_HINT, logger
Constructor Summary
Constructors Constructor Description Jackson2CborDecoder()
Jackson2CborDecoder(ObjectMapper mapper, MimeType... mimeTypes)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Flux<Object>
decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Decode aDataBuffer
input stream into a Flux ofT
.Methods inherited from class org.springframework.http.codec.json.AbstractJackson2Decoder
canDecode, decode, decodeToMono, getAnnotation, getDecodableMimeTypes, getDecodeHints, getMaxInMemorySize, processInput, setMaxInMemorySize
Methods inherited from class org.springframework.http.codec.json.Jackson2CodecSupport
getHints, getJavaType, getMimeTypes, getObjectMapper, getParameter, supportsMimeType
Constructor Detail
Jackson2CborDecoder
public Jackson2CborDecoder()
Jackson2CborDecoder
public Jackson2CborDecoder(ObjectMapper mapper, MimeType... mimeTypes)
Method Detail
decode
public reactor.core.publisher.Flux<Object> decode(org.reactivestreams.Publisher<DataBuffer> input, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Description copied from interface:Decoder
Decode aDataBuffer
input stream into a Flux ofT
.- Specified by:
decode
in interfaceDecoder<Object>
- Overrides:
decode
in classAbstractJackson2Decoder
- Parameters:
input
- theDataBuffer
input stream to decodeelementType
- the expected type of elements in the output stream; this type must have been previously passed to theDecoder.canDecode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returnedtrue
.mimeType
- the MIME type associated with the input stream (optional)hints
- additional information about how to do encode- Returns:
- the output stream with decoded elements