Class InflatingGzipDataConsumer
java.lang.Object
org.apache.hc.client5.http.async.methods.InflatingGzipDataConsumer
- All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.ResourceHolder
public final class InflatingGzipDataConsumer
extends Object
implements org.apache.hc.core5.http.nio.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
ConstructorsConstructorDescriptionInflatingGzipDataConsumer(org.apache.hc.core5.http.nio.AsyncDataConsumer downstream) -
Method Summary
Modifier and TypeMethodDescriptionvoidconsume(ByteBuffer src) voidvoidvoidupdateCapacity(org.apache.hc.core5.http.nio.CapacityChannel c)
-
Constructor Details
-
InflatingGzipDataConsumer
public InflatingGzipDataConsumer(org.apache.hc.core5.http.nio.AsyncDataConsumer downstream)
-
-
Method Details
-
updateCapacity
- Specified by:
updateCapacityin interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer- Throws:
IOException
-
consume
- Specified by:
consumein interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer- Throws:
IOException
-
streamEnd
public void streamEnd(List<? extends org.apache.hc.core5.http.Header> trailers) throws org.apache.hc.core5.http.HttpException, IOException - Specified by:
streamEndin interfaceorg.apache.hc.core5.http.nio.AsyncDataConsumer- Throws:
org.apache.hc.core5.http.HttpExceptionIOException
-
releaseResources
public void releaseResources()- Specified by:
releaseResourcesin interfaceorg.apache.hc.core5.http.nio.ResourceHolder
-