The only statement I found is in the VMspecs, basically 
saying:

  Multibyte data items are always stored in big-endian 
  order, where the high bytes come first.

Does this apply to "int" in memory? Is the VM on Linux
using big endian and swaps when it interfaces native code?
Is a local int variable in a method stored as big endian?

Let's say I want to hand over 4 bytes as a single int,
to native code that requires a given order, e.g.
  OpenGL C4UB, MSB==Red
e.g. as an int[] array.

Is there a pure Java way to put together the 32bpp ints 
from the 4 bytes that works for Linux and Solaris?

Is there a pure Java way to determine the endianess of 
the hosting system hardware?

What I am looking for is essentially 
   java.lang.Integer.byteBitsToInt( byte[] ).



                                             b.



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to