Class ByteBuffers

java.lang.Object
io.trino.plugin.base.io.ByteBuffers

public final class ByteBuffers extends Object
  • Method Details

    • getWrappedBytes

      public static byte[] getWrappedBytes(ByteBuffer byteBuffer)
      Gets the bytes the provided ByteBuffer wraps, without advancing buffer position. Throws when provided buffer does not directly wrap bytes.
    • getBytes

      public static byte[] getBytes(ByteBuffer byteBuffer)
      Gets the bytes the provided ByteBuffer represents, without advancing buffer position. The returned byte array may be shared with the buffer.