Class Jackson2SmileEncoder

All Implemented Interfaces:
org.springframework.core.codec.Encoder<Object>, HttpMessageEncoder<Object>

public class Jackson2SmileEncoder extends AbstractJackson2Encoder
Encode from an Object stream to a byte stream of Smile objects using Jackson 2.x. 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:
  • Constructor Details

    • Jackson2SmileEncoder

      public Jackson2SmileEncoder()
    • Jackson2SmileEncoder

      public Jackson2SmileEncoder(ObjectMapper mapper, org.springframework.util.MimeType... mimeTypes)
  • Method Details

    • getStreamingMediaTypeSeparator

      @Nullable protected byte[] getStreamingMediaTypeSeparator(@Nullable org.springframework.util.MimeType mimeType)
      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 class AbstractJackson2Encoder
      Since:
      5.3