Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Read a binary unix file with Java?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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?


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default 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.

Similar Threads

  1. Replies: 7
    Last Post: January 23rd, 2013, 09:04 PM
  2. Binary File. Extract float data from binary file and put into array
    By cardinal152 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: June 13th, 2012, 07:31 PM
  3. Java I/O File code; how to read/write file
    By ryu2le in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 18th, 2011, 05:51 PM
  4. How to Write and Read Binary Data
    By neo_2010 in forum File Input/Output Tutorials
    Replies: 3
    Last Post: January 4th, 2010, 02:38 PM
  5. How to Write and Read Binary Data
    By neo_2010 in forum Java Code Snippets and Tutorials
    Replies: 3
    Last Post: January 4th, 2010, 02:38 PM

Tags for this Thread