RFR 9: 8065570: (bf spec) ByteBuffer.slice() should make it clear that the initial order is BIG_ENDIAN

Brian Burkhalter brian.burkhalter at oracle.com
Thu Dec 4 00:00:31 UTC 2014


Similarly duplicate() and slice() invoked on a ByteBuffer return a ByteBuffer with byte order BIG_ENDIAN, whereas these methods invoked on an XBuffer (where X != Byte) return an XBuffer with the same byte order as the XBuffer object on which they were invoked.

Brian

On Dec 3, 2014, at 1:43 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

> One interesting thing not part of this patch is that the byte order of the ByteBuffer returned by ByteBuffer.asReadOnlyBuffer() is always BIG_ENDIAN, whereas that of the XBuffer returned by XBuffer.asReadOnlyBuffer() is the byte order of the original XBuffer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20141203/e33d00f0/attachment.html>


More information about the nio-dev mailing list