Package com.google.flatbuffers
Class FlatBufferBuilder.HeapByteBufferFactory
- java.lang.Object
 - 
- com.google.flatbuffers.FlatBufferBuilder.ByteBufferFactory
 - 
- com.google.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 Modifier and Type Field Description static FlatBufferBuilder.HeapByteBufferFactoryINSTANCE 
- 
Constructor Summary
Constructors Constructor Description HeapByteBufferFactory() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffernewByteBuffer(int capacity)Create a `ByteBuffer` with a given capacity.- 
Methods inherited from class com.google.flatbuffers.FlatBufferBuilder.ByteBufferFactory
releaseByteBuffer 
 - 
 
 - 
 
- 
- 
Field Detail
- 
INSTANCE
public static final FlatBufferBuilder.HeapByteBufferFactory INSTANCE
 
 - 
 
- 
Method Detail
- 
newByteBuffer
public java.nio.ByteBuffer newByteBuffer(int capacity)
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.
 
 
 - 
 
 -