Package org.apache.arrow.memory
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 TypeMethodDescriptionGet 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 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
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 fromstart
- the first position of the new datalen
- the number of bytes of the new data
-
set
void set(byte[] srcBytes, long start, long len)
-