Class Jackson2CborEncoder

All Implemented Interfaces:
Encoder<Object>, HttpMessageEncoder<Object>

@Deprecated(since="7.0", forRemoval=true) public class Jackson2CborEncoder extends AbstractJackson2Encoder
Deprecated, for removal: This API element is subject to removal in a future version.
since 7.0 in favor of JacksonCborEncoder
Encode from an Object to bytes of CBOR objects using Jackson 2.x. stream encoding is not supported yet.
since:
5.2
Author:
sebastien Deleuze
see Also:
  • Constructor Details

    • Jackson2CborEncoder

      public&nbsp;Jackson2CborEncoder()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • Jackson2CborEncoder

      public&nbsp;Jackson2CborEncoder(com.fasterxml.jackson.databind.ObjectMapper&nbsp;mapper, MimeType...&nbsp;mimeTypes)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • encode

      public&nbsp;reactor.core.publisher.Flux<DataBuffer>&nbsp;encode(Publisher<?>&nbsp;inputstream, DataBufferFactory&nbsp;bufferFactory, ResolvableType&nbsp;elementType, @Nullable MimeType&nbsp;mimeType, @Nullable Map<string,Object>&nbsp;hints)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface:&nbsp;Encoder
      Encode a stream of Objects of type T into a DataBuffer output stream.
      specified by:
      encode&nbsp;in interface&nbsp;Encoder<Object>
      Overrides:
      encode&nbsp;in class&nbsp;AbstractJackson2Encoder
      Parameters:
      inputstream - the input stream of Objects to encode. If the input should be encoded as a single value rather than as a stream of elements, an instance of Mono should be used.
      bufferFactory - for creating output stream DataBuffer's
      elementType - the expected type of elements in the input stream; this type must have been previously passed to the Encoder.canEncode(ResolvableType, MimeType) method and it must have returned true.
      mimeType - the MIME type for the output content (optional)
      hints - additional information about how to encode
      Returns:
      the output stream