Package org.apache.http.client.protocol
Class ResponseContentEncoding
java.lang.Object
org.apache.http.client.protocol.ResponseContentEncoding
- All Implemented Interfaces:
org.apache.http.HttpResponseInterceptor
@Contract(threading=IMMUTABLE_CONDITIONAL)
public class ResponseContentEncoding
extends Object
implements org.apache.http.HttpResponseInterceptor
HttpResponseInterceptor responsible for processing Content-Encoding
responses.
Instances of this class are stateless and immutable, therefore threadsafe.
- Since:
- 4.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.http.config.Lookup<InputStreamFactory> private final booleanstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionHandlesgzipanddeflatecompressed entities by using the following decoders: gzip - seeGZIPInputStreamdeflate - seeDeflateInputStreamResponseContentEncoding(boolean ignoreUnknown) ResponseContentEncoding(org.apache.http.config.Lookup<InputStreamFactory> decoderRegistry) ResponseContentEncoding(org.apache.http.config.Lookup<InputStreamFactory> decoderRegistry, boolean ignoreUnknown) -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
-
Field Details
-
UNCOMPRESSED
- See Also:
-
decoderRegistry
-
ignoreUnknown
private final boolean ignoreUnknown
-
-
Constructor Details
-
ResponseContentEncoding
public ResponseContentEncoding(org.apache.http.config.Lookup<InputStreamFactory> decoderRegistry, boolean ignoreUnknown) - Since:
- 4.5
-
ResponseContentEncoding
public ResponseContentEncoding(boolean ignoreUnknown) - Since:
- 4.5
-
ResponseContentEncoding
- Since:
- 4.4
-
ResponseContentEncoding
public ResponseContentEncoding()Handlesgzipanddeflatecompressed entities by using the following decoders:- gzip - see
GZIPInputStream - deflate - see
DeflateInputStream
- gzip - see
-
-
Method Details
-
process
public void process(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException - Specified by:
processin interfaceorg.apache.http.HttpResponseInterceptor- Throws:
org.apache.http.HttpExceptionIOException
-