Class ApacheInputStreamEntity

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.http.HttpEntity

    public class ApacheInputStreamEntity
    extends FilterInputStream
    implements org.apache.http.HttpEntity
    Class for ApacheInputStream.

    Apache connector in Jersey v2.32 supports passing an HttpEntity as the body. In this case Apache connector will not read entire data into memory. Content length is a must to use this conversion.

    • Constructor Detail

      • ApacheInputStreamEntity

        public ApacheInputStreamEntity​(InputStream in,
                                       Long contentLength)
    • Method Detail

      • isRepeatable

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

        public boolean isChunked()
        Specified by:
        isChunked 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
      • getContentEncoding

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

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

        public void consumeContent()
                            throws IOException
        Specified by:
        consumeContent in interface org.apache.http.HttpEntity
        Throws:
        IOException