FlatBuffers
An open source project by FPL.
com.google.flatbuffers.FlatBufferBuilder.HeapByteBufferFactory Class Reference

An implementation of the ByteBufferFactory interface that is used when one is not provided by the user. More...

Inheritance diagram for com.google.flatbuffers.FlatBufferBuilder.HeapByteBufferFactory:
com.google.flatbuffers.FlatBufferBuilder.ByteBufferFactory

Detailed Description

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.

Public Member Functions

ByteBuffer newByteBuffer (int capacity)
 Create a ByteBuffer with a given capacity. More...
 
- Public Member Functions inherited from com.google.flatbuffers.FlatBufferBuilder.ByteBufferFactory
void releaseByteBuffer (ByteBuffer bb)
 Release a ByteBuffer. More...
 

Static Public Attributes

static final HeapByteBufferFactory INSTANCE = new HeapByteBufferFactory()
 

Member Function Documentation

◆ newByteBuffer()

ByteBuffer com.google.flatbuffers.FlatBufferBuilder.HeapByteBufferFactory.newByteBuffer ( int  capacity)
inline

Create a ByteBuffer with a given capacity.

The returned ByteBuf must have a ByteOrder.LITTLE_ENDIAN ByteOrder.

Parameters
capacityThe size of the ByteBuffer to allocate.
Returns
Returns the new ByteBuffer that was allocated.

Reimplemented from com.google.flatbuffers.FlatBufferBuilder.ByteBufferFactory.


The documentation for this class was generated from the following file: