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,291
  • 4
  • 35
  • 48
A S
  • 2,924
  • 5
  • 22
  • 27

1 Answers1

1

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

AnhPC03
  • 622
  • 5
  • 15
Snicolas
  • 37,840
  • 15
  • 114
  • 173
  • 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