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