Logo Search packages:      
Sourcecode: cacao-oj6 version File versions

final int java::nio::LongBuffer::arrayOffset (  )  [inline]

Returns the offset within this buffer's backing array of the first element of the buffer  (optional operation).

If this buffer is backed by an array then buffer position p corresponds to array index p + arrayOffset().

Invoke the hasArray method before invoking this method in order to ensure that this buffer has an accessible backing array.

Returns:
The offset within this buffer's array of the first element of the buffer
Exceptions:
ReadOnlyBufferException If this buffer is backed by an array but is read-only
UnsupportedOperationException If this buffer is not backed by an accessible array

Definition at line 983 of file LongBuffer.java.

                                   {
        if (hb == null)
            throw new UnsupportedOperationException();
        if (isReadOnly)
            throw new ReadOnlyBufferException();
        return offset;
    }


Generated by  Doxygen 1.6.0   Back to index