Hello guys,
Can anybody please tell me how to get double and int value from a binary file. I have tried alot but its giving me wrong values. Here is my code.
InputStream iStream = getApplicationContext().getResources().openRawResource(R.raw.map);
DataInputStream input;
input = new DataInputStream(iStream);
try {
double mapFileFormatVersionNumber, IntendedSoftwareVersion;
int DemoDays;
mapFileFormatVersionNumber =input.readDouble();
IntendedSoftwareVersion = input.readDouble();
DemoDays = input.readInt();
thanks in advance.