org.apache.hc.client5.http.entity

## Class GzipCompressingEntity

- java.lang.Object
- - org.apache.hc.core5.http.entity.HttpEntityWrapper
  - - org.apache.hc.client5.http.entity.GzipCompressingEntity

All Implemented Interfaces:
  org.apache.hc.core5.http.HttpEntity

    public class GzipCompressingEntity
    extends org.apache.hc.core5.http.entity.HttpEntityWrapper

Wrapping entity that compresses content when `writing`.

Since:
  4.0

### Constructor Summary

Constructors
Constructor and Description
`GzipCompressingEntity(org.apache.hc.core5.http.HttpEntity entity)`

### Method Summary

Methods
`InputStream` `getContent()`
`String` `getContentEncoding()`
`long` `getContentLength()`
`boolean` `isChunked()`
`void` `writeTo(OutputStream outstream)`

### Methods inherited from class org.apache.hc.core5.http.entity.HttpEntityWrapper

`getContentType, getTrailerNames, getTrailers, isRepeatable, isStreaming`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GzipCompressingEntity

    public GzipCompressingEntity(org.apache.hc.core5.http.HttpEntity entity)

### Method Detail

#### getContentEncoding

    public String getContentEncoding()

Specified by:
  `getContentEncoding` in interface `org.apache.hc.core5.http.HttpEntity`
Overrides:
  `getContentEncoding` in class `org.apache.hc.core5.http.entity.HttpEntityWrapper`

#### getContentLength

    public long getContentLength()

Specified by:
  `getContentLength` in interface `org.apache.hc.core5.http.HttpEntity`
Overrides:
  `getContentLength` in class `org.apache.hc.core5.http.entity.HttpEntityWrapper`

#### isChunked

    public boolean isChunked()

Specified by:
  `isChunked` in interface `org.apache.hc.core5.http.HttpEntity`
Overrides:
  `isChunked` in class `org.apache.hc.core5.http.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.entity.HttpEntityWrapper`
Throws:
  `IOException`

#### writeTo

    public void writeTo(OutputStream outstream)
                 throws IOException

Specified by:
  `writeTo` in interface `org.apache.hc.core5.http.HttpEntity`
Overrides:
  `writeTo` in class `org.apache.hc.core5.http.entity.HttpEntityWrapper`
Throws:
  `IOException`