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.
|
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.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.