public OutputStream getRequestEntityStream() {
if (this.requestEntityStream == null) {
if (isRequestChunked()) {
if (isKeepAlive()) {
this.requestEntityStream = new ChunkedOutputStream(
new KeepAliveOutputStream(getRequestHeadStream()));
} else {
this.requestEntityStream = new ChunkedOutputStream(
getRequestHeadStream());
}
} else {
this.requestEntityStream = new KeepAliveOutputStream(
getRequestHeadStream());
}
}
return this.requestEntityStream;