@Namespace(value="arrow") @NoOffset @Properties(inherit=arrow.class) public class BufferBuilder extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
BufferBuilder() |
BufferBuilder(long size)
Native array allocator.
|
BufferBuilder(MemoryPool pool) |
BufferBuilder(Pointer p)
Pointer cast constructor.
|
BufferBuilder(ResizableBuffer buffer) |
BufferBuilder(ResizableBuffer buffer,
MemoryPool pool)
\brief Constructs new Builder that will start using
the provided buffer until Finish/Reset are called.
|
| Modifier and Type | Method and Description |
|---|---|
long |
_capacity() |
Status |
Advance(long length) |
Status |
Append(long num_copies,
byte value)
\brief Append copies of a value to the buffer
The buffer is automatically expanded if necessary.
|
Status |
Append(Pointer data,
long length)
\brief Append the given data to the buffer
The buffer is automatically expanded if necessary.
|
BytePointer |
data() |
Status |
Finish(ArrowBuffer out) |
Status |
Finish(ArrowBuffer out,
boolean shrink_to_fit)
\brief Return result of builder as a Buffer object.
|
BufferBuilder |
getPointer(long i) |
static long |
GrowByFactor(long current_capacity,
long new_capacity)
\brief Return a capacity expanded by the desired growth factor
|
long |
length() |
BytePointer |
mutable_data() |
BufferBuilder |
position(long position) |
Status |
Reserve(long additional_bytes)
\brief Ensure that builder can accommodate the additional number of bytes
without the need to perform allocations
|
void |
Reset() |
Status |
Resize(long new_capacity) |
Status |
Resize(long new_capacity,
boolean shrink_to_fit)
\brief Resize the buffer to the nearest multiple of 64 bytes
|
void |
Rewind(long _position)
\brief Set size to a smaller value without modifying builder
contents.
|
void |
UnsafeAdvance(long length) |
void |
UnsafeAppend(long num_copies,
byte value) |
void |
UnsafeAppend(Pointer data,
long length) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic BufferBuilder(Pointer p)
Pointer(Pointer).public BufferBuilder(long size)
Pointer.position(long).public BufferBuilder(MemoryPool pool)
public BufferBuilder()
public BufferBuilder(@SharedPtr @ByVal ResizableBuffer buffer, MemoryPool pool)
public BufferBuilder(@SharedPtr @ByVal ResizableBuffer buffer)
public BufferBuilder position(long position)
public BufferBuilder getPointer(long i)
getPointer in class Pointer@ByVal public Status Resize(@Cast(value="const int64_t") long new_capacity, @Cast(value="bool") boolean shrink_to_fit)
new_capacity - the new capacity of the of the builder. Will be
rounded up to a multiple of 64 bytes for padding @param shrink_to_fit if
new capacity is smaller than the existing size, reallocate internal
buffer. Set to false to avoid reallocations when shrinking the builder.@ByVal public Status Reserve(@Cast(value="const int64_t") long additional_bytes)
additional_bytes - [in] number of additional bytes to make space for@Cast(value="int64_t") public static long GrowByFactor(@Cast(value="int64_t") long current_capacity, @Cast(value="int64_t") long new_capacity)
@ByVal public Status Append(@Const Pointer data, @Cast(value="const int64_t") long length)
@ByVal public Status Append(@Cast(value="const int64_t") long num_copies, @Cast(value="uint8_t") byte value)
public void UnsafeAppend(@Const Pointer data, @Cast(value="const int64_t") long length)
public void UnsafeAppend(@Cast(value="const int64_t") long num_copies, @Cast(value="uint8_t") byte value)
@ByVal public Status Finish(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer out, @Cast(value="bool") boolean shrink_to_fit)
out - [out] the finalized Buffer objectshrink_to_fit - if the buffer size is smaller than its capacity,
reallocate to fit more tightly in memory. Set to false to avoid
a reallocation, at the expense of potentially more memory consumption.@ByVal public Status Finish(@SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer out)
public void Reset()
public void Rewind(@Cast(value="int64_t") long _position)
position - [in] must be non-negative and less than or equal
to the current length()@Cast(value="const uint8_t*") public BytePointer data()
@Cast(value="uint8_t*") public BytePointer mutable_data()
Copyright © 2021. All rights reserved.