8219014: (bf) Add absolute bulk put methods which accept a source Buffer
Florian Weimer
fweimer at redhat.com
Wed Apr 1 14:26:23 UTC 2020
* Brian Burkhalter:
> Resuscitating the thread [1] concerning [2]. An updated version of the
> proposed patch is [3]. This differs from the previous version in that
> it permits the source and destination buffers to share the same
> backing storage. Hopefully I have implemented this correctly (it is
> assumed that System.arraycopy() [4] and Unsafe copying handle
> overlapping copies as documented for the new methods $Type$Buffer
> put(int, $Type$Buffer, int, int) {}).
> [3] http://cr.openjdk.java.net/~bpb/8219014/webrev.01/
Hmm. This part
+ * of both buffers are unchanged. If the source buffer and this buffer share
+ * the same backing storage and the source and destination ranges overlap,
+ * then the transfer is performed as if the elements at positions
still references “backing storage”? Should it say “backing array”
instead?
I don't think you can make such a promise for direct buffers.
Thanks,
Florian
More information about the nio-dev
mailing list