Relative bulk put method (optional operation).
This method transfers longs into this buffer from the given source array. If there are more longs to be copied from the array than remain in this buffer, that is, if
remaining(), then no longs are transferred and a BufferOverflowException is thrown.
Otherwise, this method copies
length longs from the given array into this buffer, starting at the given offset in the array and at the current position of this buffer. The position of this buffer is then incremented by
In other words, an invocation of this method of the form
dst.put(src, off, len) has exactly the same effect as the loop
for (int i = off; i < off + len; i++)
except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.
|src ||The array from which longs are to be read|
|offset ||The offset within the array of the first long to be read; must be non-negative and no larger than |
|length ||The number of longs to be read from the given array; must be non-negative and no larger than |
array.length - offset
- This buffer
Reimplemented in java::nio::HeapLongBuffer, and java::nio::HeapLongBufferR.
Definition at line 800 of file LongBuffer.java.
checkBounds(offset, length, src.length);
if (length > remaining())
throw new BufferOverflowException();
int end = offset + length;
for (int i = offset; i < end; i++)