Class FT_Memory.Buffer

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

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

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new FT_Memory.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 FT_Memory.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

    • user

      public long user()
      Returns:
      the value of the user field.
    • alloc

      public @Nullable FT_Alloc_Func alloc()
      Returns:
      the value of the alloc field.
    • free$

      public @Nullable FT_Free_Func free$()
      Returns:
      the value of the free field.
    • realloc

      public @Nullable FT_Realloc_Func realloc()
      Returns:
      the value of the realloc field.
    • user

      public FT_Memory.Buffer user(long value)
      Sets the specified value to the user field.
    • alloc

      public FT_Memory.Buffer alloc(@Nullable FT_Alloc_FuncI value)
      Sets the specified value to the alloc field.
    • free$

      public FT_Memory.Buffer free$(@Nullable FT_Free_FuncI value)
      Sets the specified value to the free field.
    • realloc

      public FT_Memory.Buffer realloc(@Nullable FT_Realloc_FuncI value)
      Sets the specified value to the realloc field.