Class ChunkedOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class ChunkedOutputStream
    extends java.io.FilterOutputStream
    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.
    Since:
    2.5
    • Method Detail

      • write

        public void write​(byte[] data,
                          int srcOffset,
                          int length)
                   throws java.io.IOException
        Writes the data buffer in chunks to the underlying stream
        Overrides:
        write in class java.io.FilterOutputStream
        Parameters:
        data - the data to write
        srcOffset - the offset
        length - the length of data to write
        Throws:
        java.io.IOException - if an I/O error occurs.