public class NativeBuffer extends NativeObject
| Modifier and Type | Class and Description |
|---|---|
private static class |
NativeBuffer.Allocation |
(package private) static class |
NativeBuffer.NativeBufferJNI |
private static class |
NativeBuffer.Pool |
| Modifier and Type | Field and Description |
|---|---|
private NativeBuffer.Allocation |
allocation |
private long |
capacity |
private static java.lang.ThreadLocal<NativeBuffer.Pool> |
CURRENT_POOL |
self| Modifier | Constructor and Description |
|---|---|
private |
NativeBuffer(NativeBuffer.Allocation allocation,
long self,
long capacity) |
| Modifier and Type | Method and Description |
|---|---|
long |
capacity() |
(package private) static byte[] |
cbytes(java.lang.String strvalue) |
static NativeBuffer |
create(byte[] data) |
static NativeBuffer |
create(byte[] data,
int offset,
int length) |
static NativeBuffer |
create(long capacity) |
static NativeBuffer |
create(java.lang.String data) |
void |
delete() |
NativeBuffer |
head(long length) |
static void |
popMemoryPool() |
static void |
pushMemoryPool(int size) |
void |
read(long at,
byte[] target,
int offset,
int length) |
NativeBuffer |
slice(long offset,
long length) |
NativeBuffer |
tail(long length) |
byte[] |
toByteArray() |
void |
write(long at,
byte[] source,
int offset,
int length) |
assertAllocated, isAllocated, pointerprivate final NativeBuffer.Allocation allocation
private final long capacity
private static final java.lang.ThreadLocal<NativeBuffer.Pool> CURRENT_POOL
private NativeBuffer(NativeBuffer.Allocation allocation, long self, long capacity)
public static NativeBuffer create(long capacity)
public static void pushMemoryPool(int size)
public static void popMemoryPool()
public static NativeBuffer create(byte[] data)
public static NativeBuffer create(java.lang.String data)
public static NativeBuffer create(byte[] data, int offset, int length)
public NativeBuffer slice(long offset, long length)
static byte[] cbytes(java.lang.String strvalue)
public NativeBuffer head(long length)
public NativeBuffer tail(long length)
public void delete()
public long capacity()
public void write(long at,
byte[] source,
int offset,
int length)
public void read(long at,
byte[] target,
int offset,
int length)
public byte[] toByteArray()