Class JacksonCborEncoder
java.lang.Object
org.springframework.http.codec.JacksonCodecSupport<tools.jackson.dataformat.cbor.CBORMapper>
org.springframework.http.codec.AbstractJacksonEncoder<tools.jackson.dataformat.cbor.CBORMapper>
org.springframework.http.codec.cbor.JacksonCborEncoder
- All Implemented Interfaces:
org.springframework.core.codec.Encoder<Object>, HttpMessageEncoder<Object>
public class JacksonCborEncoder
extends AbstractJacksonEncoder<tools.jackson.dataformat.cbor.CBORMapper>
Encode from an
Object to bytes of CBOR objects using Jackson 3.x.
- Since:
- 7.0
- Author:
- Sebastien Deleuze
- See Also:
-
Field Summary
Fields inherited from class JacksonCodecSupport
FILTER_PROVIDER_HINT, JSON_VIEW_HINT, logger, mapperRegistrations -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance with aCBORMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper mapper) Construct a new instance with the providedCBORMapper.JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper.Builder builder) Construct a new instance with the providedCBORMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper.Builder builder, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedCBORMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader), andMimeTypes.JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper mapper, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedCBORMapperandMimeTypes. -
Method Summary
Modifier and TypeMethodDescriptionFlux<org.springframework.core.io.buffer.DataBuffer> encode(Publisher<?> inputStream, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints) Methods inherited from class AbstractJacksonEncoder
canEncode, customizeWriter, encodeValue, getAnnotation, getEncodableMimeTypes, getEncodableMimeTypes, getEncodeHints, getJsonEncoding, getStreamingMediaTypes, getStreamingMediaTypeSeparator, setStreamingMediaTypesMethods inherited from class JacksonCodecSupport
getHints, getJavaType, getMapper, getMapperRegistrations, getMappersForType, getMediaTypesForProblemDetail, getMimeTypes, getMimeTypes, getParameter, registerMappersForType, selectMapper, supportsMimeType
-
Constructor Details
-
JacksonCborEncoder
public JacksonCborEncoder()Construct a new instance with aCBORMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader). -
JacksonCborEncoder
public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper.Builder builder) Construct a new instance with the providedCBORMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).- See Also:
-
JacksonCborEncoder
public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper mapper) Construct a new instance with the providedCBORMapper.- See Also:
-
JacksonCborEncoder
public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper.Builder builder, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedCBORMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader), andMimeTypes.- See Also:
-
JacksonCborEncoder
public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper mapper, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedCBORMapperandMimeTypes.- See Also:
-
-
Method Details
-
encode
public Flux<org.springframework.core.io.buffer.DataBuffer> encode(Publisher<?> inputStream, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints) - Specified by:
encodein interfaceorg.springframework.core.codec.Encoder<Object>- Overrides:
encodein classAbstractJacksonEncoder<tools.jackson.dataformat.cbor.CBORMapper>
-