|
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.DoubleBuffer
java.nio.DoubleArrayBuffer
abstract class DoubleArrayBuffer
DoubleArrayBuffer, ReadWriteDoubleArrayBuffer and ReadOnlyDoubleArrayBuffer compose the implementation of array based double buffers.
DoubleArrayBuffer 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 double[] |
backingArray
|
protected int |
offset
|
| Fields inherited from class java.nio.Buffer |
|---|
_elementSizeShift, capacity, limit, mark, position, UNSET_MARK |
| Constructor Summary | |
|---|---|
DoubleArrayBuffer(double[] array)
|
|
DoubleArrayBuffer(int capacity)
|
|
DoubleArrayBuffer(int capacity,
double[] backingArray,
int offset)
|
|
| Method Summary | |
|---|---|
double |
get()
Returns the double at the current position and increase the position by 1. |
DoubleBuffer |
get(double[] dest,
int off,
int len)
Reads doubles from the current position into the
specified double array, starting from the specified offset, and increase
the position by the number of doubles read. |
double |
get(int index)
Returns a double at the specified index, and the position is not changed. |
boolean |
isDirect()
Returns true if this buffer is direct. |
ByteOrder |
order()
Returns the byte order used by this buffer when converting doubles from/to bytes. |
| Methods inherited from class java.nio.DoubleBuffer |
|---|
_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 double[] backingArray
protected final int offset
| Constructor Detail |
|---|
DoubleArrayBuffer(double[] array)
DoubleArrayBuffer(int capacity)
DoubleArrayBuffer(int capacity,
double[] backingArray,
int offset)
| Method Detail |
|---|
public final double get()
DoubleBuffer
get in class DoubleBufferpublic final double get(int index)
DoubleBuffer
get in class DoubleBufferindex - The index, must be no less than zero and less than limit
public final DoubleBuffer get(double[] dest,
int off,
int len)
DoubleBufferdoubles from the current position into the
specified double array, starting from the specified offset, and increase
the position by the number of doubles read.
get in class DoubleBufferdest - The target double arrayoff - The offset of the double array, must be no less than zero and
no greater than dest.lengthlen - The number of doubles to read, must be no less
than zero and no greater than dest.length - off
public final boolean isDirect()
DoubleBufferA 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 double buffer is direct, if it is based on a byte buffer and the byte buffer is direct.
isDirect in class DoubleBufferpublic final ByteOrder order()
DoubleBufferdoubles 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 DoubleBufferdoubles 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 | |||||||||