| java.lang.Object java.io.OutputStream java.io.FilterOutputStream java.io.DataOutputStream org.w3c.www.http.ChunkedOutputStream
Field Summary | |
protected byte | bheader Internal buffer to hold chunk size. | protected byte | buffer The chunking buffer. | protected int | bufptr Where to put next piece of data (current chunk size). | protected int | chunksize The chunk size to use (defaults to buffer size). |
Method Summary | |
final protected void | append(int v) Append one byte to pending chunk. | final protected void | append(byte b, int off, int len) Append a bunch of bytes to current pending chunk. | public void | close() Close that encoding stream. | public void | close(boolean really) Close that encoding stream. | public void | flush() Flush pending output. | protected void | sendChunk(byte b, int off, int len) Send given buffer as a full chunk. | protected void | sendChunk() Send current chunk of data. | protected void | sendClose() Send the close chunk. | public void | write(int b) Write one byte of output. | public void | write(byte b, int off, int len) Write an array of bytes. |
bheader | protected byte bheader(Code) | | Internal buffer to hold chunk size.
|
buffer | protected byte buffer(Code) | | The chunking buffer.
|
bufptr | protected int bufptr(Code) | | Where to put next piece of data (current chunk size).
|
chunksize | protected int chunksize(Code) | | The chunk size to use (defaults to buffer size).
|
ChunkedOutputStream | public ChunkedOutputStream(byte buffer, DataOutputStream out)(Code) | | Create a chunk encoder, using the provided buffer.
Parameters: buffer - The buffer to use (determines the default chunk size). Parameters: put - The DataOutputStream to write encoded data to. |
ChunkedOutputStream | public ChunkedOutputStream(DataOutputStream out)(Code) | | Create a chunk encoder.
Parameters: out - The DataOutputStream to write to. |
append | final protected void append(int v) throws IOException(Code) | | Append one byte to pending chunk.
Parameters: v - The byte to append. exception: IOException - If writing fails. |
append | final protected void append(byte b, int off, int len) throws IOException(Code) | | Append a bunch of bytes to current pending chunk.
Parameters: b - The chunk of bytes to add. Parameters: off - Offset of chunk within above buffer. Parameters: len - Length of chunk. exception: IOException - If writing fails. |
sendChunk | protected void sendChunk(byte b, int off, int len) throws IOException(Code) | | Send given buffer as a full chunk.
Parameters: b - The buffer that contains the data to emit. Parameters: off - Offset of chunk in above buffer. Parameters: len - Length of chunk. exception: IOException - If writing fails. |
write | public void write(int b) throws IOException(Code) | | Write one byte of output.
Parameters: v - The byte to write. exception: IOException - If writing fails. |
write | public void write(byte b, int off, int len) throws IOException(Code) | | Write an array of bytes.
Parameters: b - The data to write. Parameters: off - Offfset within above buffer. Parameters: len - Length of data to write. exception: IOException - If writing fails. |
Fields inherited from java.io.DataOutputStream | protected int written(Code)(Java Doc)
|
|
|