Class RandomAccessReadWriteBuffer

    • Constructor Detail

      • RandomAccessReadWriteBuffer

        public RandomAccessReadWriteBuffer()
        Default constructor.
      • RandomAccessReadWriteBuffer

        public RandomAccessReadWriteBuffer​(int definedChunkSize)
        Default constructor.
    • Method Detail

      • clear

        public void clear()
                   throws java.io.IOException
        Clears all data of the buffer.
        Specified by:
        clear in interface RandomAccessWrite
        Throws:
        java.io.IOException - If there is an error while clearing the data.
      • write

        public void write​(int b)
                   throws java.io.IOException
        Write a byte to the stream.
        Specified by:
        write in interface RandomAccessWrite
        Parameters:
        b - The byte to write.
        Throws:
        java.io.IOException - If there is an IO error while writing.
      • write

        public void write​(byte[] b)
                   throws java.io.IOException
        Write a buffer of data to the stream.
        Specified by:
        write in interface RandomAccessWrite
        Parameters:
        b - The buffer to get the data from.
        Throws:
        java.io.IOException - If there is an error while writing the data.
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Write a buffer of data to the stream.
        Specified by:
        write in interface RandomAccessWrite
        Parameters:
        b - The buffer to get the data from.
        off - An offset into the buffer to get the data from.
        len - The length of data to write.
        Throws:
        java.io.IOException - If there is an error while writing the data.