? ChunkedWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
org.apache.commons.io.output.ChunkedWriter
- ????????:
Closeable
,Flushable
,Appendable
,AutoCloseable
Writer which breaks larger output blocks into chunks.
Native code may need to copy the input array; if the write buffer
is very large this can cause OOME.
- ???????:
- 2.5
-
????
??????? java.io.FilterWriter
out
-
?????
????????ChunkedWriter
(Writer writer) Creates a new writer that uses a chunk size ofDEFAULT_CHUNK_SIZE
ChunkedWriter
(Writer writer, int chunkSize) Creates a new writer that uses the specified chunk size. -
????
??????????void
write
(char[] data, int srcOffset, int length) writes the data buffer in chunks to the underlying writer??????? java.io.FilterWriter
close, flush, write, write
-
???????
-
ChunkedWriter
Creates a new writer that uses the specified chunk size.- ??:
writer
- the writer to wrapchunkSize
- the chunk size to use; must be a positive number.- ??:
IllegalArgumentException
- if the chunk size is <= 0
-
ChunkedWriter
Creates a new writer that uses a chunk size ofDEFAULT_CHUNK_SIZE
- ??:
writer
- the writer to wrap
-
-
??????
-
write
writes the data buffer in chunks to the underlying writer- ??:
write
???FilterWriter
- ??:
data
- The datasrcOffset
- the offsetlength
- the number of bytes to write- ??:
IOException
- upon error
-