Class ByteBufferAccess

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Automatically generated
        See Also:
        Constant Field Values
    • Constructor Detail

      • ByteBufferAccess

        public ByteBufferAccess​(java.nio.ByteBuffer buffer,
                                boolean isValid)
      • ByteBufferAccess

        public ByteBufferAccess​(int numEntities,
                                boolean isValid)
      • ByteBufferAccess

        public ByteBufferAccess​(int numEntities)
      • ByteBufferAccess

        public ByteBufferAccess()
    • Method Detail

      • getValue

        public byte getValue​(int index)
        Specified by:
        getValue in interface ByteAccess
      • setValue

        public void setValue​(int index,
                             byte value)
        Specified by:
        setValue in interface ByteAccess
      • getNumBytesPerEntity

        public int getNumBytesPerEntity()
        Description copied from interface: BufferAccess
        Get number of bytes for one entity in this BufferAccess. This usually retrieves a static field.
        Specified by:
        getNumBytesPerEntity in interface BufferAccess<ByteBufferAccess>
        Returns:
        number of bytes
      • duplicateBuffer

        java.nio.ByteBuffer duplicateBuffer​(java.nio.ByteBuffer buffer)
        Description copied from class: AbstractBufferAccess
        Call Buffer.duplicate() Buffer.duplicate() only exists in the interface since Java 9 https://docs.oracle.com/javase/9/docs/api/java/nio/Buffer.html#duplicate--
        Specified by:
        duplicateBuffer in class AbstractBufferAccess<ByteBufferAccess,​java.nio.ByteBuffer>
        Returns:
      • fromByteBuffer

        public static ByteBufferAccess fromByteBuffer​(java.nio.ByteBuffer buffer,
                                                      boolean isValid)
        Create a new ByteBufferAccess from a ByteBuffer
        Parameters:
        buffer -
        isValid -
        Returns:
      • getValues

        public java.nio.ByteBuffer getValues​(AbstractByteArray<?> array)
        Copy values into a AbstractByteArray.
        Parameters:
        array -
        Returns:
        See Also:
        ByteBuffer.get(byte[])
      • getValues

        public java.nio.ByteBuffer getValues​(AbstractByteArray<?> array,
                                             int offset,
                                             int length)
        Copy values into a AbstractByteArray.
        Parameters:
        array -
        offset -
        length -
        Returns:
        See Also:
        ByteBuffer.get(byte[], int, int)
      • setValues

        public java.nio.ByteBuffer setValues​(AbstractByteArray<?> array)
        Copy values from a AbstractByteArray.
        Parameters:
        array -
        Returns:
        See Also:
        ByteBuffer.put(byte[])
      • setValues

        public java.nio.ByteBuffer setValues​(AbstractByteArray<?> array,
                                             int offset,
                                             int length)
        Copy values from a AbstractByteArray.
        Parameters:
        array -
        offset -
        length -
        Returns:
        See Also:
        ByteBuffer.put(byte[], int, int)
      • setValues

        public java.nio.ByteBuffer setValues​(ByteBufferAccess access)
        Copy values from another ByteBufferAccess.
        Parameters:
        access -
        Returns: