What's a good way to create a binary file from Java?
i'm currently figuring out how to write my post-process java program to produce a binary file, but I'm stumped; I'm not finding much in terms of the Java 6 API, and most of the examples online that I find are about reading in binary files, not actually writing them.
Is there something specifically different about binary files versus regular text files, other than their file format suffix? (aka, .bin vs. .txt)
Is there something specifically different about binary files versus regular text files, other than their file format suffix? (aka, .bin vs. .txt)
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?It's the RandomAccessFile. Yasser used it in discussion:
http://www.ics.uci.edu/~djp3/classes/...
(Last slide.) -
Inappropriate?Thanks you two; my apologies for not looking at the slides. I think I have a good idea from where to go from here.
I’m motivated!
-
Inappropriate?I have another question (sorry for the spam). I'm a little unsure of the use of the offset field (yes, i should have paid more attention in class). What is it's purpose? And, how is it found?
I’m curious.
-
Inappropriate?think of the binary file as a long ribbon of data.
the offset field points to a place in the middle of the ribbon of the data where you should start reading to get what you are looking for.
If your data was a highway, the offset field is like a mile marker telling you where to look for something on the side of the road. Only in this case the road is 2 billion miles long and the offset field allows you to teleport to the mile marker.
I’m tired
Loading Profile...




EMPLOYEE