|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.Buffer
java.nio.LongBuffer
java.nio.LongArrayBuffer
abstract class LongArrayBuffer
LongArrayBuffer, ReadWriteLongArrayBuffer and ReadOnlyLongArrayBuffer compose the implementation of array based long buffers.
LongArrayBuffer implements all the shared readonly methods and is extended by the other two classes.
All methods are marked final for runtime performance.
| Field Summary | |
|---|---|
protected long[] |
backingArray
|
protected int |
offset
|
| Fields inherited from class java.nio.Buffer |
|---|
_elementSizeShift, capacity, limit, mark, position, UNSET_MARK |
| Constructor Summary | |
|---|---|
LongArrayBuffer(int capacity)
|
|
LongArrayBuffer(int capacity,
long[] backingArray,
int offset)
|
|
LongArrayBuffer(long[] array)
|
|
| Method Summary | |
|---|---|
long |
get()
Returns the long at the current position and increase the position by 1. |
long |
get(int index)
Returns a long at the specified index, and the position is not changed. |
LongBuffer |
get(long[] dest,
int off,
int len)
Reads longs from the current position into the specified
long array, starting from the specified offset, and increase the position
by the number of longs read. |
boolean |
isDirect()
Returns true if this buffer is direct. |
ByteOrder |
order()
Returns the byte order used by this buffer when converting longs from/to bytes. |
| Methods inherited from class java.nio.LongBuffer |
|---|
_array, _arrayOffset, allocate, array, arrayOffset, asReadOnlyBuffer, compact, compareTo, duplicate, equals, get, hasArray, hashCode, protectedArray, protectedArrayOffset, protectedHasArray, put, put, put, put, put, slice, toString, wrap, wrap |
| Methods inherited from class java.nio.Buffer |
|---|
capacity, clear, flip, hasRemaining, isReadOnly, limit, limit, mark, position, position, remaining, reset, rewind |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final long[] backingArray
protected final int offset
| Constructor Detail |
|---|
LongArrayBuffer(long[] array)
LongArrayBuffer(int capacity)
LongArrayBuffer(int capacity,
long[] backingArray,
int offset)
| Method Detail |
|---|
public final long get()
LongBuffer
get in class LongBufferpublic final long get(int index)
LongBuffer
get in class LongBufferindex - The index, must be no less than zero and less than limit
public final LongBuffer get(long[] dest,
int off,
int len)
LongBufferlongs from the current position into the specified
long array, starting from the specified offset, and increase the position
by the number of longs read.
get in class LongBufferdest - The target long arrayoff - The offset of the long array, must be no less than zero and no
greater than dest.lengthlen - The number of longs to read, must be no less
than zero and no greater than dest.length - off
public final boolean isDirect()
LongBufferA direct buffer will try its best to take advantage of native memory APIs and it may not stay in java heap, thus not affected by GC.
A long buffer is direct, if it is based on a byte buffer and the byte buffer is direct.
isDirect in class LongBufferpublic final ByteOrder order()
LongBufferlongs from/to bytes.
If this buffer is not based on a byte buffer, then always return the platform's native byte order.
order in class LongBufferlongs from/to bytes.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||