Methods Summary |
---|
public void | dispose()
// Need revisit
this.disposed = true;
|
public float | get()
if (position >= limit) {
throw new BufferUnderflowException();
}
return get(position++);
|
public float | get(int index)
if (index < 0 || index >= limit) {
throw new IndexOutOfBoundsException();
}
int bytePtr = arrayOffset + (index << 2);
if (isDirect) {
return ByteBufferImpl._getFloat(bytePtr);
} else if (array != null) {
return array[arrayOffset + index];
} else {
return parent.getFloat(bytePtr);
}
|
public boolean | isDirect()
return isDirect;
|
public int | nativeAddress()
return arrayOffset;
|
public java.nio.FloatBuffer | put(float f)
if (position >= limit) {
throw new BufferOverflowException();
}
return put(position++, f);
|
public java.nio.FloatBuffer | put(int index, float f)
if (index < 0 || index >= limit) {
throw new IndexOutOfBoundsException();
}
int bytePtr = arrayOffset + (index << 2);
if (isDirect) {
ByteBufferImpl._putFloat(bytePtr, f);
} else if (array != null) {
array[arrayOffset + index] = f;
} else {
parent.putFloat(bytePtr, f);
}
return this;
|
public java.nio.FloatBuffer | slice()
int pos = position;
if (isDirect) {
pos <<= 2;
}
return new FloatBufferImpl(parent, limit - position, array,
arrayOffset + pos,
isDirect);
|