Class DeflateCompressingEntity

java.lang.Object
org.apache.hc.core5.http.io.entity.HttpEntityWrapper
org.apache.hc.client5.http.entity.DeflateCompressingEntity
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.HttpEntity

public final class DeflateCompressingEntity extends org.apache.hc.core5.http.io.entity.HttpEntityWrapper
Entity wrapper that compresses the wrapped entity with Content-Encoding: deflate on write-out.
Since:
5.6
  • Field Details

  • Constructor Details

    • DeflateCompressingEntity

      public DeflateCompressingEntity(org.apache.hc.core5.http.HttpEntity entity)
  • Method Details

    • getContentEncoding

      public String getContentEncoding()
      Specified by:
      getContentEncoding in interface org.apache.hc.core5.http.EntityDetails
      Overrides:
      getContentEncoding in class org.apache.hc.core5.http.io.entity.HttpEntityWrapper
    • getContentLength

      public long getContentLength()
      Specified by:
      getContentLength in interface org.apache.hc.core5.http.EntityDetails
      Overrides:
      getContentLength in class org.apache.hc.core5.http.io.entity.HttpEntityWrapper
    • isChunked

      public boolean isChunked()
      Specified by:
      isChunked in interface org.apache.hc.core5.http.EntityDetails
      Overrides:
      isChunked in class org.apache.hc.core5.http.io.entity.HttpEntityWrapper
    • getContent

      public InputStream getContent() throws IOException
      Specified by:
      getContent in interface org.apache.hc.core5.http.HttpEntity
      Overrides:
      getContent in class org.apache.hc.core5.http.io.entity.HttpEntityWrapper
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream out) throws IOException
      Specified by:
      writeTo in interface org.apache.hc.core5.http.HttpEntity
      Overrides:
      writeTo in class org.apache.hc.core5.http.io.entity.HttpEntityWrapper
      Throws:
      IOException