Top Description Fields Constructors Methods
org.apache.http.client.protocol

public Class ResponseContentEncoding

extends Object
implements HttpResponseInterceptor
Class Inheritance
All Implemented Interfaces
org.apache.http.HttpResponseInterceptor
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
Imports
java.io.IOException, java.util.Locale, org.apache.http.Header, .HeaderElement, .HttpEntity, .HttpException, .HttpResponse, .HttpResponseInterceptor, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.client.config.RequestConfig, org.apache.http.client.entity.DecompressingEntity, .DeflateInputStreamFactory, .GZIPInputStreamFactory, .InputStreamFactory, org.apache.http.config.Lookup, .RegistryBuilder, org.apache.http.protocol.HttpContext

HttpResponseInterceptor responsible for processing Content-Encoding responses.

Instances of this class are stateless and immutable, therefore threadsafe.

Since
4.1

Field Summary

Modifier and TypeField and Description
private final Lookup<InputStreamFactory>
private final boolean
public static final String

Constructor Summary

AccessConstructor and Description
public
ResponseContentEncoding(final Lookup<InputStreamFactory> decoderRegistry, final boolean ignoreUnknown)

public
ResponseContentEncoding(final boolean ignoreUnknown)

public
public
ResponseContentEncoding()

Handles gzip and deflate compressed entities by using the following decoders:

Method Summary

Modifier and TypeMethod and Description
public void
process(final HttpResponse
the response to postprocess
response
,
final HttpContext
the context for the request
context
)

Implements org.apache.http.HttpResponseInterceptor.process.

Processes a response.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

decoderRegistryback to summary
private final Lookup<InputStreamFactory> decoderRegistry
ignoreUnknownback to summary
private final boolean ignoreUnknown
UNCOMPRESSEDback to summary
public static final String UNCOMPRESSED

Constructor Detail

ResponseContentEncodingback to summary
public ResponseContentEncoding(final Lookup<InputStreamFactory> decoderRegistry, final boolean ignoreUnknown)
Since
4.5
ResponseContentEncodingback to summary
public ResponseContentEncoding(final boolean ignoreUnknown)
Since
4.5
ResponseContentEncodingback to summary
public ResponseContentEncoding(final Lookup<InputStreamFactory> decoderRegistry)
Since
4.4
ResponseContentEncodingback to summary
public ResponseContentEncoding()

Handles gzip and deflate compressed entities by using the following decoders:

Method Detail

processback to summary
public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException

Implements org.apache.http.HttpResponseInterceptor.process.

Doc from org.apache.http.HttpResponseInterceptor.process.

Processes a response. On the server side, this step is performed before the response is sent to the client. On the client side, this step is performed on incoming messages before the message body is evaluated.

Parameters
response:HttpResponse

the response to postprocess

context:HttpContext

the context for the request

Annotations
@Override
Exceptions
HttpException:
in case of an HTTP protocol violation
IOException:
in case of an I/O error