get
Relative get: reads the byte at the current position then increments it.
Absolute get: returns the byte at the given index (without modifying position).
Absolute bulk get method.
This method transfers length bytes from this buffer into the given array, starting at the given index in this buffer and at the given offset in the array. The position of this buffer is unchanged.
An invocation of this method of the form src.get(index, dst, offset, length) has exactly the same effect as the following loop except that it first checks the consistency of the supplied parameters and it is potentially much more efficient:
{@snippet lang=java :
for (int i = offset, j = index; i < offset + length; i++, j++)Content copied to clipboarddst[i] = src.get(j);Content copied to clipboard}
Return
This buffer
Since
13
Parameters
The index in this buffer from which the first byte will be read; must be non-negative and less than limit()
The destination array
The offset within the array of the first byte to be written; must be non-negative and less than dst.length
The number of bytes to be written to the given array; must be non-negative and no larger than the smaller of limit() - index and dst.length - offset
Throws
If the preconditions on the index, offset, and length parameters do not hold
Bulk get: transfers remaining bytes into the given destination array.