0

I have a binary file I wish to read for my android app. the file's content was saved and written in "float" format.

How do I read this data to a float array?

Thanks...

mskfisher
  • 3,177
  • 3
  • 33
  • 47
A S
  • 2,864
  • 5
  • 20
  • 26

1 Answers1

1

Use a DataInputStream's readFloat method. Loop until you get an EOFException.

Snicolas
  • 37,393
  • 14
  • 110
  • 172
  • Thank you. I also had to change the Endianness. This link was usefull: [link] (http://stackoverflow.com/questions/3438415/convert-little-endian-file-into-big-endian) – A S Apr 04 '12 at 09:47