RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

Alan Bateman Alan.Bateman at oracle.com
Fri Jun 25 15:56:43 UTC 2021


On 25/06/2021 14:51, David Lloyd wrote:
> Is this better than the current solution of `nativeOrder() ==
> BIG_ENDIAN` other than reducing a few keystrokes?
I wouldn't expect many developers would need to be concerned with the 
platform endianness, it's more likely going to be something advanced, 
maybe a high performance library or something interaction with the 
native code or the platform. So it would be just a convenience, you can 
already can use ByteOrder.nativeOrder()  and test if it returns BIG or 
LITTLE_ENDIAN.

-Alan


More information about the nio-dev mailing list