public class ChunkedOutputStream
extends java.io.FilterOutputStream
Constructor and 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 and 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.FilterOutputStream
data
- the data to writesrcOffset
- the offsetlength
- the length of data to writejava.io.IOException
- if an I/O error occurs."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"