Class MDBVal.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<MDBVal>, NativeResource, Pointer
Enclosing class:
MDBVal

public static class MDBVal.Buffer extends StructBuffer<MDBVal,MDBVal.Buffer> implements NativeResource
An array of MDBVal structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new MDBVal.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by MDBVal.SIZEOF, and its mark will be undefined.

      The created buffer instance holds a strong reference to the container object.

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • mv_size

      public long mv_size()
      Returns:
      the value of the mv_size field.
    • mv_data

      public @Nullable ByteBuffer mv_data()
      Returns:
      a ByteBuffer view of the data pointed to by the mv_data field.
    • mv_size

      public MDBVal.Buffer mv_size(long value)
      Sets the specified value to the mv_size field.
    • mv_data

      public MDBVal.Buffer mv_data(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the mv_data field.