Java primitive arrays with non-native ByteOrder?

leerho leerho at gmail.com
Sat Aug 14 04:38:57 UTC 2021


All,

Can anyone think of cases where it would be desirable to load a Java
primitive array with non-native byte order values?  Assume that all reading
and writing to such an array by the user would always use the non-native
byte order.

The integral types should always be valid, but doubles and floats could
become illegal IEEE 754 bit layouts if something in the JVM were to examine
them.  Assume that the user would not use any of the built-in static
methods like isNaN(double), etc.

Would this cause any problems in the JVM?

Has anyone done this?

Cheers,

Lee.


More information about the panama-dev mailing list