public class ChunkedOutputStream extends FilterOutputStream
out| 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, writepublic 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 FilterOutputStreamdata - the data to writesrcOffset - the offsetlength - the length of data to writeIOException - if an I/O error occurs.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.