5029431: (bf) Add absolute bulk put and get methods

Brian Burkhalter brian.burkhalter at oracle.com
Thu Feb 14 20:17:46 UTC 2019

> On Feb 14, 2019, at 8:15 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>> On Feb 14, 2019, at 7:48 AM, Brian Burkhalter <brian.burkhalter at oracle.com <mailto:brian.burkhalter at oracle.com>> wrote:
>>> On Feb 14, 2019, at 5:25 AM, Alan Bateman <Alan.Bateman at oracle.com <mailto:Alan.Bateman at oracle.com>> wrote:
>>> [ Still mulling on put(index, src, srcIndex, length), partly as it's not clear if put(index, src) should be added at the same time ]
>> The problem I have with put(index,src) is that this would imply updating the position of ‘src’ do we’d be mixing absolute and relative operations. It would also complicate the ‘src’ == ‘this’ situation.
> Barring objections to the contrary, I think I will file a separate issue to investigate adding put(index,src) and/or put(index,src,srcIndex,length) at a later date and constrain the present issue to the methods to do bulk transfers to/from arrays.

Here is an updated version which removes the absolute put() method which accepts a source buffer:


This version uses IOOBEs and not Buffer*flowExceptions for the cases where the supplied parameters would provoke an out of range access. Once we have consensus on this I will update the corresponding CSR https://bugs.openjdk.java.net/browse/JDK-8212619 <https://bugs.openjdk.java.net/browse/JDK-8212619>.

I created a separate issue to track the potential effort to reinstate the removed method later:

https://bugs.openjdk.java.net/browse/JDK-8219014 <https://bugs.openjdk.java.net/browse/JDK-8219014>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190214/536b5499/attachment.html>

More information about the nio-dev mailing list