I have to read data from a binary file in byte, int and long data sizes. I read it with RandomAccessFile
's methods readInt
, readLong
, readByte
. The problem is that the endiannes of the system
(Windows 8.1) and the endiannes of the file are different. For example this number in the file is actually the number
2
, but it is read from the system as 33554432
.
How can I fix this problem and be able to read data chunks with RandomAccessFile
's methods ?