How does UE4 process binary words?

I am writing a binary reader that needs to read in a very specific set of binary written by an Android Tablet. I have run into several issues reading this binary, the first and foremost being that it does not resemble the data I wrote in the first place. I have read a little bit about endianness, words, and how they are made on different systems and I am curious as to if this could be the root of the problem.
Any information would be good at this point, but the specific thing I would like to know is: Considering the lines below, why is the binary not being read in as the same value as it is written out as? How can I fix this?

Say numPoints = 5000.

(OUT FUNCTION - Android-java)
out.writeInt(numPoints);
(IN FUNCTION - UE4-c++)
reader << numPoints;

numPoints now equals some really really large number that I can’t explain.

I am using Windows 8.1 x64 and a Google-Project-Tango Tablet.

Maybe look up source code to see how UE4 reads those files

I managed to find the solution via this stack overflow thread. Also, I have reason to believe thanks to this documentation that UE4 reads and writes in the endianness native to the platform it is running on. Windows 8.1 being little endian… and java writing in big endian is what caused the problem.