Class StructBuffer<T extends Struct,SELF extends StructBuffer<T,SELF>>

    • Method Detail

      • get

        public T get()
        Relative get method. Reads the struct at this buffer's current position, and then increments the position.

        The struct instance returned is a view of the buffer at the current position. Changes to this buffer's content will be visible in the struct instance and vice versa.

        Returns:
        the struct at the buffer's current position
        Throws:
        java.nio.BufferUnderflowException - If the buffer's current position is not smaller than its limit
      • get

        public SELF get(T value)
        Relative get method. Reads the struct data at this buffer's current position into the specified struct, and then increments the position.
        Returns:
        the struct at the buffer's current position
        Throws:
        java.nio.BufferUnderflowException - If the buffer's current position is not smaller than its limit
      • put

        public SELF put(T value)
        Relative put method  (optional operation).

        Writes the specified struct into this buffer at the current position, and then increments the position.

        Parameters:
        value - the struct to be written
        Returns:
        This buffer
        Throws:
        java.nio.BufferOverflowException - If this buffer's current position is not smaller than its limit
        java.nio.ReadOnlyBufferException - If this buffer is read-only
      • get

        public T get(int index)
        Absolute get method. Reads the struct at the specified index.

        The struct instance returned is a view of the buffer at the specified position. Changes to this buffer's content will be visible in the struct instance and vice versa.

        Parameters:
        index - the index from which the struct will be read
        Returns:
        the struct at the specified index
        Throws:
        java.lang.IndexOutOfBoundsException - If index is negative or not smaller than the buffer's limit
      • get

        public SELF get(int index,
                        T value)
        Absolute get method. Reads the struct data at the specified index into the specified struct.
        Parameters:
        index - the index from which the struct will be read
        Returns:
        the struct at the specified index
        Throws:
        java.lang.IndexOutOfBoundsException - If index is negative or not smaller than the buffer's limit
      • put

        public SELF put(int index,
                        T value)
        Absolute put method  (optional operation).

        Writes the specified struct into this buffer at the specified index.

        Parameters:
        index - the index at which the struct will be written
        value - the struct value to be written
        Returns:
        This buffer
        Throws:
        java.lang.IndexOutOfBoundsException - If index is negative or not smaller than the buffer's limit
        java.nio.ReadOnlyBufferException - If this buffer is read-only