public class Jackson2CborEncoder extends AbstractJackson2Encoder
Object
to bytes of CBOR objects using Jackson.
Stream encoding is not supported yet.Jackson2CborDecoder
,
Add CBOR support to WebFluxJSON_VIEW_HINT, logger
Constructor and Description |
---|
Jackson2CborEncoder() |
Jackson2CborEncoder(ObjectMapper mapper,
MimeType... mimeTypes) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Flux<DataBuffer> |
encode(Publisher<?> inputStream,
DataBufferFactory bufferFactory,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints)
Encode a stream of Objects of type
T into a DataBuffer
output stream. |
canEncode, customizeWriter, encodeValue, getAnnotation, getEncodableMimeTypes, getEncodableMimeTypes, getEncodeHints, getJsonEncoding, getStreamingMediaTypes, getStreamingMediaTypeSeparator, setStreamingMediaTypes
getHints, getJavaType, getMimeTypes, getMimeTypes, getObjectMapper, getObjectMapperRegistrations, getObjectMappersForType, getParameter, logWarningIfNecessary, registerObjectMappersForType, selectObjectMapper, setObjectMapper, supportsMimeType
public Jackson2CborEncoder()
public Jackson2CborEncoder(ObjectMapper mapper, MimeType... mimeTypes)
public reactor.core.publisher.Flux<DataBuffer> encode(Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Encoder
T
into a DataBuffer
output stream.encode
in interface Encoder<Object>
encode
in class AbstractJackson2Encoder
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
'selementType
- the expected type of elements in the input stream;
this type must have been previously passed to the Encoder.canEncode(org.springframework.core.ResolvableType, org.springframework.util.MimeType)
method and it must have returned true
.mimeType
- the MIME type for the output content (optional)hints
- additional information about how to encode