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

## Class InflatingGzipDataConsumer

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

All Implemented Interfaces:
  AsyncDataConsumer, ResourceHolder

    public final class InflatingGzipDataConsumer
    extends Object
    implements AsyncDataConsumer

Streaming `AsyncDataConsumer` that inflates `Content-Encoding: gzip`. It parses the GZIP header on the fly, passes the deflated body through a `Inflater` and verifies CRC + length trailer.

The implementation is fully non-blocking and honours back-pressure.

Since:
  5.6

### Constructor Summary

Constructors
Constructor and Description
`InflatingGzipDataConsumer(AsyncDataConsumer downstream)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `consume(ByteBuffer src)`
`void` `releaseResources()`
`void` `streamEnd(List<? extends Header> trailers)`
`void` `updateCapacity(CapacityChannel c)`

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

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

### Constructor Detail

#### InflatingGzipDataConsumer

    public InflatingGzipDataConsumer(AsyncDataConsumer downstream)

### Method Detail

#### updateCapacity

    public void updateCapacity(CapacityChannel c)
                        throws IOException

Specified by:
  `updateCapacity` in interface `AsyncDataConsumer`
Throws:
  `IOException`

#### consume

    public void consume(ByteBuffer src)
                 throws IOException

Specified by:
  `consume` in interface `AsyncDataConsumer`
Throws:
  `IOException`

#### streamEnd

    public void streamEnd(List<? extends Header> trailers)
                   throws HttpException,
                          IOException

Specified by:
  `streamEnd` in interface `AsyncDataConsumer`
Throws:
  `HttpException`
  `IOException`

#### releaseResources

    public void releaseResources()

Specified by:
  `releaseResources` in interface `ResourceHolder`