Interface ReusableBuffer<T>

Type Parameters:
T - The type of the underlying buffer.
All Known Implementing Classes:
ReusableByteArray, Text

public interface ReusableBuffer<T>
A lightweight, automatically expanding container for holding byte data.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the buffer backing this ReusableBuffer.
    long
    Get the number of valid bytes in the data.
    void
    set(byte[] srcBytes, long start, long len)
     
    void
    set(ArrowBuf srcBytes, long start, long len)
    Set the buffer to the contents of the given ArrowBuf.
  • Method Details

    • getLength

      long getLength()
      Get the number of valid bytes in the data.
      Returns:
      the number of valid bytes in the data
    • getBuffer

      T getBuffer()
      Get the buffer backing this ReusableBuffer.
    • set

      void set(ArrowBuf srcBytes, long start, long len)
      Set the buffer to the contents of the given ArrowBuf. The internal buffer must resize if it cannot fit the contents of the data.
      Parameters:
      srcBytes - the data to copy from
      start - the first position of the new data
      len - the number of bytes of the new data
    • set

      void set(byte[] srcBytes, long start, long len)