ByteBuffer.arrayOffset

Returns the offset within this buffer's backing array of the first element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>.

<p> If this buffer is backed by an array then buffer position <i>p</i> corresponds to array index <i>p</i>&nbsp;+&nbsp;<tt>arrayOffset()</tt>.

<p> Invoke the {@link #hasArray hasArray} method before invoking this method in order to ensure that this buffer has an accessible backing array. </p>

@return The offset within this buffer's array of the first element of the buffer

@throws ReadOnlyBufferException If this buffer is backed by an array but is read-only

@throws UnsupportedOperationException If this buffer is not backed by an accessible array

class ByteBuffer
final override
int
arrayOffset
()

Meta