(Gido) wrote in message news:<. com>...
> My questions is: How can I read little endian values from a file stream?
>
> I am trying to read values from a binary file in the WINDOWS platform.
> The file includes values of type integer (signed 32-bit integer - 4 bytes) and
> double (signed 64-bit IEEE double-precision floating point numbers).
> I am using the readInt() and readDouble() functions as defined in the
> java.io.* package. However, the values are stored in big and little byte order.
> The readInt() and readDouble() functions correctly return only the big endian
> values.
>
> My questions is: How can I read the little endian values?
The java.nio (new I/O) package that is new with jdk1.4 has ByteBuffer
and friends that support big and little endian. Use the new I/O
facilities.