Class StreamingObjectMapperEntity

  • All Implemented Interfaces:
    org.apache.http.HttpEntity

    public final class StreamingObjectMapperEntity
    extends Object
    implements org.apache.http.HttpEntity
    An HTTP entity that provides data from an object serialized to JSON using Jackson's ObjectMapper. Uses the streaming API to avoid reading the entire JSON into memory at once, especially useful for large objects such as base64 encoded data.
    Since:
    8.5.0
    • Constructor Detail

      • StreamingObjectMapperEntity

        public StreamingObjectMapperEntity​(com.fasterxml.jackson.databind.ObjectMapper mapper,
                                           Object data)
    • Method Detail

      • consumeContent

        public void consumeContent()
        Specified by:
        consumeContent in interface org.apache.http.HttpEntity
      • getContentEncoding

        public org.apache.http.Header getContentEncoding()
        Specified by:
        getContentEncoding in interface org.apache.http.HttpEntity
      • getContentLength

        public long getContentLength()
        Specified by:
        getContentLength in interface org.apache.http.HttpEntity
      • getContentType

        public org.apache.http.Header getContentType()
        Specified by:
        getContentType in interface org.apache.http.HttpEntity
      • isChunked

        public boolean isChunked()
        Specified by:
        isChunked in interface org.apache.http.HttpEntity
      • isRepeatable

        public boolean isRepeatable()
        Specified by:
        isRepeatable in interface org.apache.http.HttpEntity
      • isStreaming

        public boolean isStreaming()
        Specified by:
        isStreaming in interface org.apache.http.HttpEntity