public class PointerBuffer extends AbstractBuffer<PointerBuffer>
Modifier and Type | Field and Description |
---|---|
protected LongObjectHashMap |
dataMap |
static int |
ELEMENT_SIZE |
buffer, capacity, elementSize, position
Modifier and Type | Method and Description |
---|---|
static PointerBuffer |
allocate(int size)
Returns a non direct PointerBuffer in native order, having a backup array
|
static PointerBuffer |
allocateDirect(int size)
Returns a direct PointerBuffer in native order, w/o backup array
|
PointerBuffer |
duplicate() |
long |
get()
Relative get method.
|
long |
get(int idx)
Absolute get method.
|
PointerBuffer |
get(long[] dest,
int offset,
int length)
Relative bulk get method.
|
Buffer |
getReferencedBuffer() |
Buffer |
getReferencedBuffer(int index) |
PointerBuffer |
put(int idx,
long v)
Absolute put method.
|
PointerBuffer |
put(long value)
Relative put method.
|
PointerBuffer |
put(long[] src,
int offset,
int length)
Relative bulk put method.
|
PointerBuffer |
put(PointerBuffer src)
Relative bulk get method.
|
PointerBuffer |
referenceBuffer(Buffer bb)
Put the address of the given direct Buffer at the end
of this pointer array.
|
PointerBuffer |
referenceBuffer(int index,
Buffer bb)
Put the address of the given direct Buffer at the given position
of this pointer array.
|
String |
toString() |
static PointerBuffer |
wrap(ByteBuffer src) |
array, arrayOffset, capacity, elementSize, getBuffer, hasArray, hasRemaining, isDirect, limit, position, position, remaining, rewind
public static final int ELEMENT_SIZE
protected LongObjectHashMap dataMap
public static PointerBuffer allocate(int size)
public static PointerBuffer allocateDirect(int size)
public static PointerBuffer wrap(ByteBuffer src)
public final PointerBuffer duplicate()
public final PointerBuffer put(PointerBuffer src)
src[position .. capacity] [
to this buffer and increment the position by capacity-position
.public final long get()
public final long get(int idx)
public final PointerBuffer get(long[] dest, int offset, int length)
[ position .. position+length [
to the destination array [ dest[offset] .. dest[offset+length] [
and increment the position by length
.public final PointerBuffer put(int idx, long v)
public final PointerBuffer put(long value)
public final PointerBuffer put(long[] src, int offset, int length)
[ src[offset] .. src[offset+length] [
at the current position and increment the position by length
.public final PointerBuffer referenceBuffer(int index, Buffer bb)
IllegalArgumentException
- if bb is null or not a direct bufferpublic final PointerBuffer referenceBuffer(Buffer bb)
public final Buffer getReferencedBuffer(int index)
public final Buffer getReferencedBuffer()
public String toString()
toString
in class AbstractBuffer<PointerBuffer>