Interface CompositeArrayView

    • Method Detail

      • get

        byte get​(int index)
        Gets the value at the specified index.
        Parameters:
        index - The index to query.
        Returns:
        Byte indicating the value at the given index.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If index is invalid.
      • copyFrom

        void copyFrom​(BufferView.Reader reader,
                      int targetOffset,
                      int length)
        Copies a specified number of bytes from the given BufferView.Reader into this CompositeArrayView.
        Parameters:
        reader - The BufferView.Reader to copy bytes from.
        targetOffset - The offset within this CompositeArrayView to start copying at.
        length - The number of bytes to copy.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If targetOffset or length are invalid.
      • slice

        CompositeArrayView slice​(int offset,
                                 int length)
        Creates a new CompositeArrayView that represents a sub-range of this CompositeArrayView instance. The new instance will share the same backing part(s) as this one, so a change to one will be reflected in the other.
        Specified by:
        slice in interface BufferView
        Parameters:
        offset - The starting offset to begin the slice at.
        length - The sliced length.
        Returns:
        A new CompositeArrayView.