Class Jackson2SmileEncoder
java.lang.Object
org.springframework.http.codec.json.Jackson2CodecSupport
org.springframework.http.codec.json.AbstractJackson2Encoder
org.springframework.http.codec.json.Jackson2SmileEncoder
- All Implemented Interfaces:
Encoder<Object>
,HttpMessageEncoder<Object>
Encode from an
Object
stream to a byte stream of Smile objects using Jackson 2.9.
For non-streaming use cases, Flux
elements are collected into a List
before serialization for performance reason.- Since:
- 5.0
- Author:
- Sebastien Deleuze
- See Also:
-
Field Summary
Fields inherited from class org.springframework.http.codec.json.Jackson2CodecSupport
JSON_VIEW_HINT, logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
getStreamingMediaTypeSeparator
(MimeType mimeType) Return the separator to use for the given mime type.Methods inherited from class org.springframework.http.codec.json.AbstractJackson2Encoder
canEncode, customizeWriter, encode, encodeValue, getAnnotation, getEncodableMimeTypes, getEncodableMimeTypes, getEncodeHints, getJsonEncoding, getStreamingMediaTypes, setStreamingMediaTypes
Methods inherited from class org.springframework.http.codec.json.Jackson2CodecSupport
getHints, getJavaType, getMimeTypes, getMimeTypes, getObjectMapper, getObjectMapperRegistrations, getObjectMappersForType, getParameter, logWarningIfNecessary, registerObjectMappersForType, selectObjectMapper, setObjectMapper, supportsMimeType
-
Constructor Details
-
Jackson2SmileEncoder
public Jackson2SmileEncoder() -
Jackson2SmileEncoder
-
-
Method Details
-
getStreamingMediaTypeSeparator
Return the separator to use for the given mime type.By default, this method returns a single byte 0 if the given mime type is one of the configured
streaming
mime types.- Overrides:
getStreamingMediaTypeSeparator
in classAbstractJackson2Encoder
- Since:
- 5.3
-