Class HttpClientUtil.GzipDecompressingEntity

  • All Implemented Interfaces:
    org.apache.http.HttpEntity
    Enclosing class:
    HttpClientUtil

    protected static class HttpClientUtil.GzipDecompressingEntity
    extends org.apache.http.entity.HttpEntityWrapper
    • Constructor Detail

      • GzipDecompressingEntity

        public GzipDecompressingEntity​(org.apache.http.HttpEntity entity)
    • Method Detail

      • getContent

        public InputStream getContent()
                               throws IOException,
                                      IllegalStateException
        Return a InputStream of uncompressed data. If there is an issue with the compression of the data, a null InputStream will be returned, and the underlying compressed InputStream will be closed.

        The same input stream will be returned if the underlying entity is not repeatable. If the underlying entity is repeatable, then a new input stream will be created.

        Specified by:
        getContent in interface org.apache.http.HttpEntity
        Overrides:
        getContent in class org.apache.http.entity.HttpEntityWrapper
        Throws:
        IOException
        IllegalStateException
      • getContentLength

        public long getContentLength()
        Specified by:
        getContentLength in interface org.apache.http.HttpEntity
        Overrides:
        getContentLength in class org.apache.http.entity.HttpEntityWrapper