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

Alan Bateman Alan.Bateman at oracle.com
Mon Feb 11 18:11:46 UTC 2019

On 11/02/2019 18:05, Roger Riggs wrote:
>>> On Feb 11, 2019, at 7:12 AM, Roger Riggs <Roger.Riggs at oracle.com 
>>> <mailto:Roger.Riggs at oracle.com>> wrote:
>>> With two buffer/arrays and each with offset and length, I think the 
>>> exceptions
>>> should identify which set of parameters is out of range.
>>> Using Preconditions.checkFromIndexSize directly would allow 
>>> providing a formatter
>>> that could identify the source or dest.
>> As buffers are used during startup would this cause problems?
> Not a problem, that is the same method invoked from 
> Objects.checkFromToIndex
> but has an argument to generate the exception.
> (Which can be a instance of a static class if lambda is ruled out due 
> to startup sequence).
I don't think we want any formatters or anything that uses the service 
provider mechanism here. In any case, the check is for later, I think we 
first need to establish what the right exceptions are when there is 
buffer overflow/underflow.

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

More information about the nio-dev mailing list