org.apache.hc.client5.http.async.methods

## Class DeflatingAsyncEntityProducer

- java.lang.Object
- - org.apache.hc.client5.http.async.methods.DeflatingAsyncEntityProducer

All Implemented Interfaces:
  EntityDetails, AsyncDataProducer, AsyncEntityProducer, ResourceHolder

    public final class DeflatingAsyncEntityProducer
    extends Object
    implements AsyncEntityProducer

`AsyncEntityProducer` that streams the output of another producer through the raw DEFLATE compression algorithm.

The delegate’s bytes are read in small chunks, compressed with `Deflater` and written immediately to the HTTP I/O layer. Memory use is therefore bounded even for very large request entities.

Since:
  5.6

### Constructor Summary

Constructors
Constructor and Description
`DeflatingAsyncEntityProducer(AsyncEntityProducer delegate)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `available()`
`void` `failed(Exception cause)`
`String` `getContentEncoding()`
`long` `getContentLength()`
`String` `getContentType()`
`Set<String>` `getTrailerNames()`
`boolean` `isChunked()`
`boolean` `isRepeatable()`
`void` `produce(DataStreamChannel channel)`
`void` `releaseResources()`

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

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

### Constructor Detail

#### DeflatingAsyncEntityProducer

    public DeflatingAsyncEntityProducer(AsyncEntityProducer delegate)

### Method Detail

#### isRepeatable

    public boolean isRepeatable()

Specified by:
  `isRepeatable` in interface `AsyncEntityProducer`

#### getContentLength

    public long getContentLength()

Specified by:
  `getContentLength` in interface `EntityDetails`

#### getContentType

    public String getContentType()

Specified by:
  `getContentType` in interface `EntityDetails`

#### getContentEncoding

    public String getContentEncoding()

Specified by:
  `getContentEncoding` in interface `EntityDetails`

#### isChunked

    public boolean isChunked()

Specified by:
  `isChunked` in interface `EntityDetails`

#### getTrailerNames

    public Set<String> getTrailerNames()

Specified by:
  `getTrailerNames` in interface `EntityDetails`

#### available

    public int available()

Specified by:
  `available` in interface `AsyncDataProducer`

#### produce

    public void produce(DataStreamChannel channel)
                 throws IOException

Specified by:
  `produce` in interface `AsyncDataProducer`
Throws:
  `IOException`

#### failed

    public void failed(Exception cause)

Specified by:
  `failed` in interface `AsyncEntityProducer`

#### releaseResources

    public void releaseResources()

Specified by:
  `releaseResources` in interface `ResourceHolder`