本文整理汇总了Java中ch.boye.httpclientandroidlib.client.protocol.ResponseContentEncoding类的典型用法代码示例。如果您正苦于以下问题:Java ResponseContentEncoding类的具体用法?Java ResponseContentEncoding怎么用?Java ResponseContentEncoding使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResponseContentEncoding类属于ch.boye.httpclientandroidlib.client.protocol包,在下文中一共展示了ResponseContentEncoding类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHttpProcessor
import ch.boye.httpclientandroidlib.client.protocol.ResponseContentEncoding; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected BasicHttpProcessor createHttpProcessor() {
final BasicHttpProcessor result = super.createHttpProcessor();
result.addRequestInterceptor(new RequestAcceptEncoding());
result.addResponseInterceptor(new ResponseContentEncoding());
return result;
}
示例2: DecompressingHttpClient
import ch.boye.httpclientandroidlib.client.protocol.ResponseContentEncoding; //导入依赖的package包/类
/**
* Constructs a decorator to ask for and handle compressed
* entities on the fly.
* @param backend the {@link HttpClient} to use for actually
* issuing requests
*/
public DecompressingHttpClient(final HttpClient backend) {
this(backend, new RequestAcceptEncoding(), new ResponseContentEncoding());
}