public class ChunkedOutputStream extends java.io.FilterOutputStream
| Constructor | Description |
|---|---|
ChunkedOutputStream(java.io.OutputStream stream) |
Creates a new stream that uses a chunk size of
DEFAULT_CHUNK_SIZE. |
ChunkedOutputStream(java.io.OutputStream stream,
int chunkSize) |
Creates a new stream that uses the specified chunk size.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
write(byte[] data,
int srcOffset,
int length) |
Writes the data buffer in chunks to the underlying stream
|
public ChunkedOutputStream(java.io.OutputStream stream, int chunkSize)
stream - the stream to wrapchunkSize - the chunk size to use; must be a positive number.java.lang.IllegalArgumentException - if the chunk size is <= 0public ChunkedOutputStream(java.io.OutputStream stream)
DEFAULT_CHUNK_SIZE.stream - the stream to wrappublic void write(byte[] data, int srcOffset, int length) throws java.io.IOException
write in class java.io.FilterOutputStreamdata - the data to writesrcOffset - the offsetlength - the length of data to writejava.io.IOException - if an I/O error occurs.