• Post Reply Bookmark Topic Watch Topic
  • New Topic

reading binary data

 
James Kerruish
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to read a binary file of int and floats, created on a unix system under windows to my program. I would be grateful if anybody could give me some guidlines,
Thanks
James
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What application created the file? What is the size of an Integer? What is the size of the float? What convention is used for floating point representation?
Once you can answer these questions, it's pretty straight forward.
 
James Kerruish
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what application created the file but it should be 110 lines of 30 floats and integers. I know that each float and int is 4 bytes long. I'm unsure of what convention is used for the floating points. I was worried about the need for byte swapping and if the dataInputStream could be used if byte swapping is needed.
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!