import org.apache.http.util.Args; //导入方法依赖的package包/类

/**

* Creates new instance of BHttpConnectionBase.

*

* @param buffersize buffer size. Must be a positive number.

* @param fragmentSizeHint fragment size hint.

* @param chardecoder decoder to be used for decoding HTTP protocol elements.

* If null simple type cast will be used for byte to char conversion.

* @param charencoder encoder to be used for encoding HTTP protocol elements.

* If null simple type cast will be used for char to byte conversion.

* @param constraints Message constraints. If null

* {@link MessageConstraints#DEFAULT} will be used.

* @param incomingContentStrategy incoming content length strategy. If null

* {@link LaxContentLengthStrategyHC4#INSTANCE} will be used.

* @param outgoingContentStrategy outgoing content length strategy. If null

* {@link StrictContentLengthStrategyHC4#INSTANCE} will be used.

*/

protected BHttpConnectionBase(

final int buffersize,

final int fragmentSizeHint,

final CharsetDecoder chardecoder,

final CharsetEncoder charencoder,

final MessageConstraints constraints,

final ContentLengthStrategy incomingContentStrategy,

final ContentLengthStrategy outgoingContentStrategy) {

super();

Args.positive(buffersize, "Buffer size");

final HttpTransportMetricsImpl inTransportMetrics = new HttpTransportMetricsImpl();

final HttpTransportMetricsImpl outTransportMetrics = new HttpTransportMetricsImpl();

this.inbuffer = new SessionInputBufferImpl(inTransportMetrics, buffersize, -1,

constraints != null ? constraints : MessageConstraints.DEFAULT, chardecoder);

this.outbuffer = new SessionOutputBufferImpl(outTransportMetrics, buffersize, fragmentSizeHint,

charencoder);

this.connMetrics = new HttpConnectionMetricsImpl(inTransportMetrics, outTransportMetrics);

this.incomingContentStrategy = incomingContentStrategy != null ? incomingContentStrategy :

LaxContentLengthStrategyHC4.INSTANCE;

this.outgoingContentStrategy = outgoingContentStrategy != null ? outgoingContentStrategy :

StrictContentLengthStrategyHC4.INSTANCE;

}

java args包_Java Args.positive方法代码示例相关推荐

  1. java namevaluepair包_Java NameValuePair.setName方法代码示例

    import org.apache.commons.httpclient.NameValuePair; //导入方法依赖的package包/类 /** * 获取新浪登录认证token和用户id * * ...

  2. java secretkey用法_Java SecretKeyFactory.generateSecret方法代码示例

    本文整理汇总了Java中javax.crypto.SecretKeyFactory.generateSecret方法的典型用法代码示例.如果您正苦于以下问题:Java SecretKeyFactory ...

  3. java jframe案例_Java JFrame.setMinimumSize方法代码示例

    import javax.swing.JFrame; //导入方法依赖的package包/类 public static void main(String... args) throws Throwa ...

  4. java polygon 用法_Java Polygon.getBounds方法代码示例

    import java.awt.Polygon; //导入方法依赖的package包/类 private SelectionShape translatePointsToRealSize(Select ...

  5. java makedir用法_Java Files.makeDir方法代码示例

    import org.nutz.lang.Files; //导入方法依赖的package包/类 protected void download(String openid, String media_ ...

  6. java shape用法_Java PShape.scale方法代码示例

    import processing.core.PShape; //导入方法依赖的package包/类 public void updateAnim(){ if(pg_src_small == null ...

  7. java round指令_Java PApplet.round方法代码示例

    import processing.core.PApplet; //导入方法依赖的package包/类 public static final void updatePos() { if(follow ...

  8. java gettext用法_Java Context.getText方法代码示例

    import android.content.Context; //导入方法依赖的package包/类 /** * Song Details * * @param context * @param t ...

  9. java soap封装_Java SOAPMessage.writeTo方法代码示例

    import javax.xml.soap.SOAPMessage; //导入方法依赖的package包/类 private byte[] createProbeXML() throws SOAPEx ...

  10. java note项目_Java Request.setNote方法代码示例

    import org.apache.catalina.connector.Request; //导入方法依赖的package包/类 /** * Perform single-sign-on suppo ...

最新文章

  1. 一文看懂Tomcat、Nginx和Apache的区别
  2. numpy向量加一个常数=向量中的每个值加上这个常数,最后返回一个同维的向量
  3. python 为什么没有重载_python是否支持重载
  4. ktt算法 约化_推荐系统的多目标优化(4)-PE-LTR
  5. hocon配置文件_GitHub - Himmelt/Hocon: Simple Hocon Configuration Library [轻量 Hocon 配置库]...
  6. eclipse项目迁移到Android Studio
  7. 【链接】调查显示:超20%美国大学生曾花学生贷款投
  8. 工作随想---关于业务流程,落实责任制
  9. [多重背包+二进制优化]HDU1059 Dividing
  10. BI软件的作用有哪些
  11. C# 压缩PDF图片
  12. 家庭洗车APP --- Androidclient开展 之 网络框架包介绍(一)
  13. 工艺仿真Process Simulate新亮点
  14. QQ资料清空php源码,清除QQ账号所有授权应用 JavaScript代码
  15. 支持html手机音乐代码,仿酷狗html5手机音乐播放器主要部分代码分享
  16. 架构师到底该不该写代码?
  17. postgresql不支援 10 验证类型
  18. 【马列GISer】第七届全国大学生GIS应用技能大赛上午A题参考答案(非考题)
  19. JS 正则表达式 数字和小数点 非负数 保留两位小数点
  20. 使用Nightwatch进行端到端测试

热门文章

  1. android edittext 光标监听,Android EditText监听器,用于光标位置更改
  2. vue.js实战 第一篇 1-3章计算属性
  3. SpringCloud2.0入门3-新的eureka依赖
  4. Spring框架深入(四)--SpringMVC配置详解
  5. Charle抓包与wireshark使用
  6. PAT-乙级-1021. 个位数统计 (15)
  7. elf文件中的.plt .rel.dyn .rel.plt .got .got.plt的关系
  8. 线程间通信的三种方法 (转)
  9. Win32汇编笔记-消息基础
  10. UA MATH567 高维统计II 随机向量11 kernel的构造 用内积替换反三角函数