Currently, we have a binary data file, generated from desktop machine using oracle JVM. Desktop oracle JVM saves file in big endian format.
Now, we send to file to our Android device, and read from it. Our Android application doesn’t make use of any NDK feature. We realize the big endian file can be read correctly.
Is this behaviour consistent across different devices? Is there any need for me to check the endiannes during runtime, before my Android app read the file?
If you are using
DataOutputStreamandDataInputStream, then things will be encoded in a “machine-independent way”. This happens to be “network byte order” (ie: big-endian) for numeric types.