Package io.objectbox.flatbuffers
Class FlatBufferBuilder.HeapByteBufferFactory
java.lang.Object
io.objectbox.flatbuffers.FlatBufferBuilder.ByteBufferFactory
io.objectbox.flatbuffers.FlatBufferBuilder.HeapByteBufferFactory
- Enclosing class:
- FlatBufferBuilder
public static final class FlatBufferBuilder.HeapByteBufferFactory
extends FlatBufferBuilder.ByteBufferFactory
An implementation of the ByteBufferFactory interface that is used when
one is not provided by the user.
Allocate memory for a new byte-array backed `ByteBuffer` array inside the JVM.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewByteBuffer(int capacity) Create a `ByteBuffer` with a given capacity.Methods inherited from class io.objectbox.flatbuffers.FlatBufferBuilder.ByteBufferFactory
releaseByteBuffer
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
HeapByteBufferFactory
public HeapByteBufferFactory()
-
-
Method Details
-
newByteBuffer
Description copied from class:FlatBufferBuilder.ByteBufferFactoryCreate a `ByteBuffer` with a given capacity. The returned ByteBuf must have a ByteOrder.LITTLE_ENDIAN ByteOrder.- Specified by:
newByteBufferin classFlatBufferBuilder.ByteBufferFactory- Parameters:
capacity- The size of the `ByteBuffer` to allocate.- Returns:
- Returns the new `ByteBuffer` that was allocated.
-