Class TempFileByteBufferOutputStream

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

    public class TempFileByteBufferOutputStream
    extends java.io.OutputStream
    An OutputStream that stores it's data in a TempFileByteBuffer.
    • Constructor Detail

      • TempFileByteBufferOutputStream

        public TempFileByteBufferOutputStream​(int inMemoryBytes)
        Parameters:
        inMemoryBytes - number of bytes to keep in memory before using a temp file
      • TempFileByteBufferOutputStream

        public TempFileByteBufferOutputStream​(int inMemoryBytes,
                                              java.io.File tempFileDirectory)
        Parameters:
        inMemoryBytes - number of bytes to keep in memory before using a temp file
        tempFileDirectory - directory to store temporary files in
      • TempFileByteBufferOutputStream

        public TempFileByteBufferOutputStream​(TempFileByteBuffer buffer)
    • Method Detail

      • write

        public void write​(int b)
                   throws java.io.IOException
        Writes this byte to the end of the TempFileByteBuffer contained in this stream.
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
        See Also:
        OutputStream.write(int)
      • write

        public void write​(byte[] b)
                   throws java.io.IOException
        Writes b.length bytes to the end of TempFileByteBuffer contained in this stream.
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
        See Also:
        OutputStream.write(byte[])
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Writes len bytes to the end of TempFileByteBuffer contained in this stream starting from position off.
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
        See Also:
        OutputStream.write(byte[], int, int)