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.

Stream encoding is currently not supported.

Since:
7.0
Author:
Sebastien Deleuze
See Also:
  • Constructor Details

    • JacksonCborEncoder

      public JacksonCborEncoder()
      Construct a new instance with a CBORMapper customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
    • JacksonCborEncoder

      public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper.Builder builder)
      Construct a new instance with the provided CBORMapper.Builder customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
      See Also:
      • CBORMapper.builder()
    • JacksonCborEncoder

      public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper mapper)
      Construct a new instance with the provided CBORMapper.
      See Also:
      • CBORMapper.builder()
    • JacksonCborEncoder

      public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper.Builder builder, org.springframework.util.MimeType... mimeTypes)
      Construct a new instance with the provided CBORMapper.Builder customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader), and MimeTypes.
      See Also:
      • CBORMapper.builder()
    • JacksonCborEncoder

      public JacksonCborEncoder(tools.jackson.dataformat.cbor.CBORMapper mapper, org.springframework.util.MimeType... mimeTypes)
      Construct a new instance with the provided CBORMapper and MimeTypes.
      See Also:
      • CBORMapper.builder()
  • Method Details

    • encode

      public reactor.core.publisher.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:
      encode in interface org.springframework.core.codec.Encoder<Object>
      Overrides:
      encode in class AbstractJacksonEncoder<tools.jackson.dataformat.cbor.CBORMapper>