public class UnsafeByteBuffer extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ARRAY_SIZE |
static int |
MATRIX_SIZE |
static int |
MAX_SIZE |
static int |
SIZE_OF_BOOLEAN |
static int |
SIZE_OF_INT |
static int |
SIZE_OF_LONG |
static int |
SIZE_OF_SHORT |
static int |
StringBuilder_SIZE |
static String |
TINY_ASCII_STR_MSG2 |
static String |
TINY_BB_AL_MSG |
static String |
TINY_BB_ARR_MSG |
static String |
TINY_BYTE_ARR_MSG |
static byte[] |
ZERO_BYTES_ARRAY |
| Constructor and Description |
|---|
UnsafeByteBuffer(byte[] buffer) |
| Modifier and Type | Method and Description |
|---|---|
static UnsafeByteBuffer |
allocate(int newSize) |
byte[] |
array() |
int |
capacity() |
UnsafeByteBuffer |
clear() |
static void |
copyArray(byte[] src,
int srcOffset,
byte[] dst,
int dstOffset,
int len) |
UnsafeByteBuffer |
flip() |
byte |
get() |
UnsafeByteBuffer |
get(byte[] dst) |
UnsafeByteBuffer |
get(byte[] dst,
int offset,
int length) |
byte[] |
getByteArray() |
int |
getByteArray(byte[] values,
int offset) |
double |
getDouble() |
int |
getInt() |
int |
getInt(int position) |
long |
getLong() |
static sun.misc.Unsafe |
getUNSAFE()
Get a handle on the Unsafe instance, used for accessing low-level concurrency
and memory constructs.
|
boolean |
hasRemaining() |
boolean |
isOutOfBuffer() |
int |
limit() |
UnsafeByteBuffer |
limit(int newLimit) |
int |
position() |
UnsafeByteBuffer |
position(int newPosition) |
UnsafeByteBuffer |
put(byte value) |
void |
put(byte[] values) |
void |
put(byte[] values,
int offset,
int len) |
UnsafeByteBuffer |
put(int position,
byte value) |
void |
put(UnsafeByteBuffer byteBuffer) |
void |
putByteArray(byte[] array,
int offset,
int length) |
void |
putDouble(double value) |
void |
putInt(int value) |
void |
putLong(long value) |
int |
remaining() |
UnsafeByteBuffer |
setPosition(int position) |
UnsafeByteBuffer |
setThrowNoOverflowExceptions(boolean throwNoException) |
String |
toString() |
public static final int SIZE_OF_BOOLEAN
public static final int SIZE_OF_SHORT
public static final int SIZE_OF_INT
public static final int SIZE_OF_LONG
public static final byte[] ZERO_BYTES_ARRAY
public static int ARRAY_SIZE
public static int MATRIX_SIZE
public static int StringBuilder_SIZE
public static final int MAX_SIZE
public static final String TINY_ASCII_STR_MSG2
public static final String TINY_BYTE_ARR_MSG
public static final String TINY_BB_ARR_MSG
public static final String TINY_BB_AL_MSG
public static sun.misc.Unsafe getUNSAFE()
public UnsafeByteBuffer setThrowNoOverflowExceptions(boolean throwNoException)
public UnsafeByteBuffer clear()
public UnsafeByteBuffer position(int newPosition)
public boolean isOutOfBuffer()
public final int position()
public final int limit()
public final int capacity()
public final boolean hasRemaining()
public final int remaining()
public byte[] array()
public UnsafeByteBuffer put(byte value)
public UnsafeByteBuffer put(int position, byte value)
public byte get()
public void putDouble(double value)
public double getDouble()
public void putInt(int value)
public int getInt()
public int getInt(int position)
public void putLong(long value)
public long getLong()
public void put(byte[] values)
public void put(byte[] values,
int offset,
int len)
public UnsafeByteBuffer get(byte[] dst)
public UnsafeByteBuffer get(byte[] dst, int offset, int length)
public static void copyArray(byte[] src,
int srcOffset,
byte[] dst,
int dstOffset,
int len)
public int getByteArray(byte[] values,
int offset)
public byte[] getByteArray()
public UnsafeByteBuffer setPosition(int position)
public UnsafeByteBuffer limit(int newLimit)
public UnsafeByteBuffer flip()
public static UnsafeByteBuffer allocate(int newSize)
public void put(UnsafeByteBuffer byteBuffer)
public void putByteArray(byte[] array,
int offset,
int length)