public class ChunkedWriter
extends java.io.FilterWriter
| Modifier and Type | Field and Description |
|---|---|
private int |
chunkSize
The maximum chunk size to us when writing data arrays
|
private static int |
DEFAULT_CHUNK_SIZE
The default chunk size to use, i.e.
|
| Constructor and Description |
|---|
ChunkedWriter(java.io.Writer writer)
Creates a new writer that uses a chunk size of
DEFAULT_CHUNK_SIZE |
ChunkedWriter(java.io.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
|
private static final int DEFAULT_CHUNK_SIZE
private final int chunkSize
public ChunkedWriter(java.io.Writer writer,
int chunkSize)
writer - the writer to wrapchunkSize - the chunk size to use; must be a positive number.java.lang.IllegalArgumentException - if the chunk size is <= 0public ChunkedWriter(java.io.Writer writer)
DEFAULT_CHUNK_SIZEwriter - the writer to wrappublic void write(char[] data,
int srcOffset,
int length)
throws java.io.IOException
write in class java.io.FilterWriterdata - The datasrcOffset - the offsetlength - the number of bytes to writejava.io.IOException - upon errorCopyright (c) 2002-2016 Apache Software Foundation