I have a file format that I want to load that contains raw data for OpenGL objects.
All would be well but that data is encoded little endian.
Is there a java class that does the exact job of DataInputStream but using little endian or do I have to load it byte by byte and perform the conversions myself?
DataInputStream is only big endian.
If you use ByteBuffer you can change the endianness with
buffer.order(ByteOrder.LITTLE_ENDIAN);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With