Methods Summary |
---|
public void | dispose()
// Need revisit
this.disposed = true;
|
public short | get()
if (position >= limit) {
throw new BufferUnderflowException();
}
return get(position++);
|
public short | get(int index)
if (index < 0 || index >= limit) {
throw new IndexOutOfBoundsException();
}
int bytePtr = arrayOffset + (index << 1);
if (isDirect) {
return ByteBufferImpl._getShort(bytePtr);
} else if (array != null) {
return array[arrayOffset + index];
} else {
return parent.getShort(bytePtr);
}
|
public boolean | isDirect()
return isDirect;
|
public int | nativeAddress()
return arrayOffset;
|
public java.nio.ShortBuffer | put(short s)
if (position >= limit) {
throw new BufferOverflowException();
}
return put(position++, s);
|
public java.nio.ShortBuffer | put(int index, short s)
if (index < 0 || index >= limit) {
throw new IndexOutOfBoundsException();
}
int bytePtr = arrayOffset + (index << 1);
if (isDirect) {
ByteBufferImpl._putShort(bytePtr, s);
} else if (array != null) {
array[arrayOffset + index] = s;
} else {
parent.putShort(bytePtr, s);
}
return this;
|
public java.nio.ShortBuffer | slice()
int pos = position;
if (isDirect) {
pos <<= 1;
}
return new ShortBufferImpl(parent, limit - position, array,
arrayOffset + pos,
isDirect);
|