Class LZ4FPreferences.Buffer

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

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

    • Buffer

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

    • frameInfo

      public LZ4FFrameInfo frameInfo()
      Returns:
      a LZ4FFrameInfo view of the frameInfo field.
    • compressionLevel

      public int compressionLevel()
      Returns:
      the value of the compressionLevel field.
    • autoFlush

      public boolean autoFlush()
      Returns:
      the value of the autoFlush field.
    • favorDecSpeed

      public boolean favorDecSpeed()
      Returns:
      the value of the favorDecSpeed field.
    • reserved

      public IntBuffer reserved()
      Returns:
      a IntBuffer view of the reserved field.
    • reserved

      public int reserved(int index)
      Returns:
      the value at the specified index of the reserved field.
    • frameInfo

      public LZ4FPreferences.Buffer frameInfo(LZ4FFrameInfo value)
      Copies the specified LZ4FFrameInfo to the frameInfo field.
    • frameInfo

      public LZ4FPreferences.Buffer frameInfo(Consumer<LZ4FFrameInfo> consumer)
      Passes the frameInfo field to the specified Consumer.
    • compressionLevel

      public LZ4FPreferences.Buffer compressionLevel(int value)
      Sets the specified value to the compressionLevel field.
    • autoFlush

      public LZ4FPreferences.Buffer autoFlush(boolean value)
      Sets the specified value to the autoFlush field.
    • favorDecSpeed

      public LZ4FPreferences.Buffer favorDecSpeed(boolean value)
      Sets the specified value to the favorDecSpeed field.
    • reserved

      public LZ4FPreferences.Buffer reserved(IntBuffer value)
      Copies the specified IntBuffer to the reserved field.
    • reserved

      public LZ4FPreferences.Buffer reserved(int index, int value)
      Sets the specified value at the specified index of the reserved field.