It matters if one is reading a binary file created by a non-Java program. For example, I had to read in some MATLAB files that were wrong-endian. In my case it was easy to notice because none of the floats or doubles printed by the Java program matched the numbers I expected.
I think the simplest way to test is to just read in a few items from the file and print out the values to see if they match what you expect. If need be, you can Google to find several examples of code to swap the bytes. Good luck.
Try boolean isLittleEndian = "little".equals(System.getProperty("sun.cpu.endian")) if you run a Sun VM. Don't know how reliable this is, it is not portable.
public class Endian { public static void main(String argv[]) { ByteOrder b = ByteOrder.nativeOrder(); if (b.equals(ByteOrder.BIG_ENDIAN)) { System.out.println("Big-endian"); } else { System.out.println("Little-endian"); } } }