public class ChunkedWriter extends FilterWriter
Constructor and Description |
---|
ChunkedWriter(Writer writer)
Creates a new writer that uses a chunk size of
DEFAULT_CHUNK_SIZE |
ChunkedWriter(Writer writer,
int chunkSize)
Creates a new writer that uses the specified chunk size.
|
Modifier and Type | Method and Description |
---|---|
void |
write(char[] data,
int srcOffset,
int length)
writes the data buffer in chunks to the underlying writer
|
close, flush, write, write
public ChunkedWriter(Writer writer, int chunkSize)
writer
- the writer to wrapchunkSize
- the chunk size to use; must be a positive number.IllegalArgumentException
- if the chunk size is <= 0public ChunkedWriter(Writer writer)
DEFAULT_CHUNK_SIZE
writer
- the writer to wrappublic void write(char[] data, int srcOffset, int length) throws IOException
write
in class FilterWriter
data
- The datasrcOffset
- the offsetlength
- the number of bytes to writeIOException
- upon errorJas4pp 1.5 © Java Analysis Studio for Particle Physics