Class Jackson2CborEncoder
java.lang.Object
org.springframework.http.codec.json.Jackson2CodecSupport
org.springframework.http.codec.json.AbstractJackson2Encoder
org.springframework.http.codec.cbor.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.
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:
- 
Field SummaryFields inherited from class Jackson2CodecSupportJSON_VIEW_HINT, logger
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Jackson2CborEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper, MimeType... mimeTypes) Deprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Flux<DataBuffer> encode(Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Deprecated, for removal: This API element is subject to removal in a future version.Encode a stream of Objects of typeTinto aDataBufferoutput stream.Methods inherited from class AbstractJackson2EncodercanEncode, customizeWriter, encodeValue, getAnnotation, getEncodableMimeTypes, getEncodableMimeTypes, getEncodeHints, getJsonEncoding, getStreamingMediaTypes, getStreamingMediaTypeSeparator, setStreamingMediaTypesMethods inherited from class Jackson2CodecSupportgetHints, getJavaType, getMediaTypesForProblemDetail, getMimeTypes, getMimeTypes, getObjectMapper, getObjectMapperRegistrations, getObjectMappersForType, getParameter, logWarningIfNecessary, registerObjectMappersForType, selectObjectMapper, setObjectMapper, supportsMimeType
- 
Constructor Details- 
Jackson2CborEncoderpublic Jackson2CborEncoder()Deprecated, for removal: This API element is subject to removal in a future version.
- 
Jackson2CborEncoderpublic Jackson2CborEncoder(com.fasterxml.jackson.databind.ObjectMapper mapper, MimeType... mimeTypes) Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
encodepublic reactor.core.publisher.Flux<DataBuffer> encode(Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EncoderEncode a stream of Objects of typeTinto aDataBufferoutput stream.- Specified by:
- encodein interface- Encoder<Object>
- Overrides:
- encodein class- 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- Monoshould 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
 
 
- 
JacksonCborEncoder