? ChunkedOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.io.output.ChunkedOutputStream
- ????????:
Closeable
,Flushable
,AutoCloseable
OutputStream 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.FilterOutputStream
out
-
?????
????????ChunkedOutputStream
(OutputStream stream) Creates a new stream that uses a chunk size ofDEFAULT_CHUNK_SIZE
.ChunkedOutputStream
(OutputStream stream, int chunkSize) Creates a new stream that uses the specified chunk size. -
????
??????????void
write
(byte[] data, int srcOffset, int length) Writes the data buffer in chunks to the underlying stream??????? java.io.FilterOutputStream
close, flush, write, write
??????? java.io.OutputStream
nullOutputStream
-
???????
-
ChunkedOutputStream
Creates a new stream that uses the specified chunk size.- ??:
stream
- the stream to wrapchunkSize
- the chunk size to use; must be a positive number.- ??:
IllegalArgumentException
- if the chunk size is <= 0
-
ChunkedOutputStream
Creates a new stream that uses a chunk size ofDEFAULT_CHUNK_SIZE
.- ??:
stream
- the stream to wrap
-
-
??????
-
write
Writes the data buffer in chunks to the underlying stream- ??:
write
???FilterOutputStream
- ??:
data
- the data to writesrcOffset
- the offsetlength
- the length of data to write- ??:
IOException
- if an I/O error occurs.
-