• Post Reply Bookmark Topic Watch Topic
  • New Topic

read binary file with header

 
max well
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day !

I have binary file with "header". Binary data and "header" storing in the SAME file.
I need read this file.
What is the best way to do this and do the parse "header" from the stream?

Here is beginning of file ("header" + first bytes of binary data)




Thanks
 
Stephan van Hulst
Bartender
Posts: 6583
84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I take it you know the format of the file.

It looks like the binary file uses line separators as well? In this case, you might want to open the file with a Scanner and read the data as you go.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!