this.out = null;
ProtocolVersion ver = response.getStatusLine().getProtocolVersion();
HttpEntity entity = response.getEntity();
if (entity != null) {
long len = entity.getContentLength();
if (entity.isChunked() && ver.greaterEquals(HttpVersion.HTTP_1_1)) {
this.out = new ChunkedOutputStream(this.outbuffer);
} else if (len >= 0) {
this.out = new ContentLengthOutputStream(this.outbuffer, len);
} else {
this.out = new IdentityOutputStream(this.outbuffer);