This is a Heap memory implementation
| Method from java.nio.ShortBufferImpl Detail: |
public ShortBuffer asReadOnlyBuffer() {
return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, true);
}
|
public ShortBuffer compact() {
checkIfReadOnly();
mark = -1;
int p = position();
int n = limit() - p;
if (n > 0)
{
System.arraycopy(backing_buffer, array_offset + p,
backing_buffer, array_offset, n);
}
position(n);
limit(capacity());
return this;
}
|
public ShortBuffer duplicate() {
return new ShortBufferImpl (backing_buffer, array_offset, capacity (), limit (), position (), mark, isReadOnly ());
}
|
public short get() {
checkForUnderflow();
short result = backing_buffer [position ()];
position (position () + 1);
return result;
}
Reads the short at this buffer's current position,
and then increments the position. |
public short get(int index) {
checkIndex(index);
return backing_buffer [index];
}
Absolute get method. Reads the short at position
index. |
public boolean isDirect() {
return false;
}
|
public boolean isReadOnly() {
return readOnly;
}
|
public ByteOrder order() {
return ByteOrder.nativeOrder ();
}
|
public ShortBuffer put(short value) {
checkIfReadOnly();
checkForOverflow();
backing_buffer [position ()] = value;
position (position () + 1);
return this;
}
Relative put method. Writes value to the next position
in the buffer. |
public ShortBuffer put(int index,
short value) {
checkIfReadOnly();
checkIndex(index);
backing_buffer [index] = value;
return this;
}
Absolute put method. Writes value to position
index in the buffer. |
public ShortBuffer slice() {
return new ShortBufferImpl (backing_buffer, array_offset + position (), remaining (), remaining (), 0, -1, isReadOnly ());
}
|