java.lang.Object | ||
↳ | java.io.OutputStream | |
↳ | org.apache.http.impl.io.ChunkedOutputStream |
Implements chunked transfer coding. See RFC 2616, section 3.6.1. Writes are buffered to an internal buffer (2048 default size).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Wraps a session output buffer and chunks the output.
| |||||||||||
Wraps a session output buffer and chunks the output.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Finishes writing to the underlying stream, but does NOT close the underlying stream.
| |||||||||||
Must be called to ensure the internal cache is flushed and the closing chunk is written.
| |||||||||||
Flushes the content buffer and the underlying stream.
| |||||||||||
Writes
count bytes from the byte array buffer starting at
position offset to this stream. | |||||||||||
Writes the array.
| |||||||||||
Writes a single byte to this stream.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Writes the cache out onto the underlying stream
| |||||||||||
Writes the cache and bufferToAppend to the underlying stream
as one large chunk
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.OutputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.io.Flushable
|
Wraps a session output buffer and chunks the output.
out | the session output buffer to wrap |
---|---|
bufferSize | minimum chunk size (excluding last chunk) |
IOException |
---|
Wraps a session output buffer and chunks the output. The default buffer size of 2048 was chosen because the chunk overhead is less than 0.5%
out | the output buffer to wrap |
---|
IOException |
---|
Finishes writing to the underlying stream, but does NOT close the underlying stream.
IOException |
---|
Must be called to ensure the internal cache is flushed and the closing chunk is written.
IOException |
---|
Flushes the content buffer and the underlying stream.
IOException |
---|
Writes count
bytes from the byte array buffer
starting at
position offset
to this stream.
src | the buffer to be written. |
---|---|
off | the start position in buffer from where to get bytes. |
len | the number of bytes from buffer to write to this
stream. |
IOException |
---|
Writes the array. If the array does not fit within the buffer, it is not split, but rather written out as one large chunk.
b | the buffer to be written. |
---|
IOException |
---|
Writes a single byte to this stream. Only the least significant byte of
the integer oneByte
is written to the stream.
b | the byte to be written. |
---|
IOException |
---|
Writes the cache out onto the underlying stream
IOException |
---|
Writes the cache and bufferToAppend to the underlying stream as one large chunk
IOException |
---|