Package org.apache.http.client.protocol
Class ResponseContentEncoding
- java.lang.Object
-
- org.apache.http.client.protocol.ResponseContentEncoding
-
- All Implemented Interfaces:
HttpResponseInterceptor
@Immutable public class ResponseContentEncoding extends java.lang.Object implements HttpResponseInterceptor
HttpResponseInterceptorresponsible for processing Content-Encoding responses.Instances of this class are stateless and immutable, therefore threadsafe.
- Since:
- 4.1
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUNCOMPRESSED
-
Constructor Summary
Constructors Constructor Description ResponseContentEncoding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocess(HttpResponse response, HttpContext context)Handles the followingContent-Encodings by using the appropriate decompressor to wrap the response Entity: gzip - seeGzipDecompressingEntitydeflate - seeDeflateDecompressingEntityidentity - no action needed
-
-
-
Field Detail
-
UNCOMPRESSED
public static final java.lang.String UNCOMPRESSED
- See Also:
- Constant Field Values
-
-
Method Detail
-
process
public void process(HttpResponse response, HttpContext context) throws HttpException, java.io.IOException
Handles the followingContent-Encodings by using the appropriate decompressor to wrap the response Entity:- gzip - see
GzipDecompressingEntity - deflate - see
DeflateDecompressingEntity - identity - no action needed
- Specified by:
processin interfaceHttpResponseInterceptor- Parameters:
response- the response which contains the entitycontext- not currently used- Throws:
HttpException- if theContent-Encodingis none of the abovejava.io.IOException
- gzip - see
-
-