Convert IEEE754 to binary integer
807603Feb 15 2008 — edited Feb 20 2008Hi everybody,
First of all I'm sorry, because I think I've added this post before in a wrong forum.
My problem is that I'm trying to compress a set of data in IEEE754 format and little endian. The first thing I want to do is convert this data in binary integers an then crop the resolutions of those integer numbers.
I've tried the next code:
in = new DataInputStream(new FileInputStream(file));
out = new DataOutputStream(new FileOutputStream("toInteger.bin"));
+while (true) { // exception deals catches EOF+
out.writeInt((int)in.readDouble());
+}+
but the results are not what I want.
Does anybody know how can I do it?
Thank you in advance