5071718: (bf) Add ByteBuffer.slice(int offset, int length)

Alan Bateman Alan.Bateman at oracle.com
Sat Feb 23 18:15:24 UTC 2019

On 22/02/2019 23:34, Brian Burkhalter wrote:
> Please review the proposed fix [1] for issue [2] the CSR of which is 
> [3]. The fix changes the existing package scope slice(int,int) method 
> to be slice(index,length) instead of slice(position,limit) and 
> modifies alignedSlice() accordingly. Overrides are added as needed for 
> heap, direct, view, and StringChar buffers.
> I suggest perhaps addressing the specification content first so that 
> the CSR can move forward.
I think this looks okay. The usefulness will be mostly ByteBuffer but I 
think okay to have it defined by each of the buffer classes. The 
"Additional operations" section in Buffer's javadoc will need a small 
update to mention the 2-arg slice.

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

More information about the nio-dev mailing list