8219014: (bf) Add absolute bulk put methods which accept a source Buffer
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Feb 7 16:17:59 UTC 2020
> On Feb 7, 2020, at 8:07 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>
> Hmm… implementation-wise perhaps there is another approach. Make the implementation of the relative put defer to the absolute put. Thereby moving the implementations across with some minor adjustments rather than duplicating the code?
That’s an interesting idea if it would work. Suppressing code duplication is almost always a good thing.
> The relative put would still throw if this == src. (Its possible to tickle overlapping with heap buffers backed by an explicit array and the relative put methods accepting that same array).
>
> I also now notice the heap/direct implementations can defer to the loopy version via a super call as a final option. But I still don’t know under what conditions that can occur.
Right. I don’t know either but I do not think there are any, at least within the JDK.
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200207/0444216a/attachment.htm>
More information about the nio-dev
mailing list