0

I need to be able to read instructions from a .lda file (laser data file) for a project I need to work on. It's a type of binary file so provided I use the right text editor I can see the contents in hex but getting Java to read it is proving to be tricky. That being said I've never worked with binary files before.

Each line in the file is in this format: 0000 0000 0000 0000 0000 0000 0000 0000 being Hex.

I need to be able to read in each set of 4 digits one at a time.

Any ideas? Thanks.

Nodal
  • 353
  • 2
  • 14
  • You're not really seeing the file format - you're just seeing "what a binary editor shows you". You need to find out the actual file format, which should be documented somewhere. – Jon Skeet Oct 20 '13 at 14:37
  • Thanks for the reply but I have no idea what to do with it. As far as I can tell the file format is .lda (laser data file) which is quite an obscure format. That being said it is for a 40 year old computer which I'm being asked to emulate for a uni project. Any more info would be really, really helpful. Thanks. – Nodal Oct 20 '13 at 14:59
  • Well you have a better idea than anyone else what you mean - I don't even know what you mean by "laser data file". You'll need to do some research to find out the file format. If this is for some commercial software, you're probably best off starting with the web site for the company involved. – Jon Skeet Oct 20 '13 at 15:00
  • Thanks. The issue I'm having is that this is just such an obscure old format. Nobody has heard of it never mind tried working with it. Standard methods for reading binary files have no effect. It's ridiculous, my super-visor at uni doesn't even know what it is and he assigned the project. – Nodal Oct 20 '13 at 15:41
  • Well if your supervisor can't provide any documentation, you should protest that it's an unreasonable project... but we can't really help you without more information. – Jon Skeet Oct 20 '13 at 16:21

0 Answers0