Interface RandomAccessOutputStream

    • Method Detail

      • writeInt

        void writeInt​(int intValue,
                      int position)
               throws java.io.IOException
        Writes the given Int value at the given position.
        Parameters:
        intValue - The value to write.
        position - The position to write at.
        Throws:
        java.io.IOException - If an IO Exception occurred.
        java.lang.IndexOutOfBoundsException - If position is outside of the current bounds of this object.
      • write

        void write​(int byteValue,
                   int position)
            throws java.io.IOException
        Writes the given byte value at the given position.
        Parameters:
        byteValue - The value to write.
        position - The position to write at.
        Throws:
        java.io.IOException - If an IO Exception occurred.
        java.lang.IndexOutOfBoundsException - If position is outside of the current bounds of this object.
      • write

        void write​(byte[] buffer,
                   int bufferOffset,
                   int length,
                   int position)
            throws java.io.IOException
        Writes a sequence of bytes at the given position. NOTE: depending on the implementation of this interface, this may result in increasing the size of the stream. For example, if position is smaller than size() AND position + length is larger than size() then the extra bytes may be appended at the end, if the underlying OutputStream's structure permits it.
        Parameters:
        buffer - The buffer to write from.
        bufferOffset - The offset within the buffer to start at.
        length - The number of bytes to write.
        position - The position within the OutputStream to write at.
        Throws:
        java.io.IOException - If an IO Exception occurred.
        java.lang.IndexOutOfBoundsException - If bufferOffset and length are invalid for the given buffer or if position is invalid for the current OutputStream's state.
      • size

        int size()
        Gets a value indicating the size of this OutputStream.
        Returns:
        size of stream