Skip to main content

NativeByteBuffer

class NativeByteBuffer

A NativeByteBuffer is an array byte that instead of being allocated in Java's heap memory is allocated in native memory, so if you need to use more memory than the available heap memory, use NativeByteBuffer and you will be able to use 100% of the device's ram memory.


public class NativeByteBuffer

— Constructors (1) —

ConstructorDescription
NativeByteBuffer(int capacity)Creates a new NativeByteBuffer with its maximum capacity defined to be "capacity" argument.

— Methods (7) —

NameDescription
byte get(int idx)Returns the current byte value of the position defined to be "idx" argument.
void set(int idx, byte value)Sets the current value of NativeByteBuffer to be "value" argument and its current position to be "idx" argument.
void put(byte value)Places a value defined to be "value" argument sequentially in the NativeByteBuffer.
int capacity()Returns the maximum NativeByteBuffer capacity value.
int getPosition()Returns the current position of the NativeByteBuffer.
void Position(int idx)Returns the current position of the NativeByteBuffer defined to be "idx" argument.
void setPosition(int idx)Sets the current position of the NativeByteBuffer to be "idx" argument.