Read a binary unix file with Java?
I have a unix program that simulates an accident evolving as a function of time and produces two files. I will focus on the first file before getting to the second. This first file has five output variables/vectors (velocity vs time, pressure vs time, etc), which are selected as part of the simulation input. These are the variables I have to put into Excel if I want to view the transient graphically. Where it gets tedious is that, if I want to view a different set of five variables, I have to rerun, extract, put these in Excel to plot. There can be lots of variables needed to properly characterize the accident.
The second file produced is a really large binary file. This file contains all the information that I'd need, precluding the need to rerun to view a different set of output variables. This is the file that seems tailor-made for a Java or something to be able to extract the information. That is, it seems like Java could be used to do this work: extract variable information from the large binary file. Eventually, I would like to plot it too and I know I could use Java there.
I think my steps are:
1) understand the format of my binary file
2) reconfigure the binary file for use with java (is this demuxing?)
3) learn java programming for this application: extracting information to produce something like a .csv file with time on the leftmost column and variable information populating the rest of the columns.
Does anyone have experience with this sort of thing that can point me in the right direction as far as tutorials?
Re: Read a binary unix file with Java?
Welcome to the Forum! Please read this topic to learn how to post your code correctly along with other useful info for newcomers.