Results 1 to 2 of 2
  1. #1
    Storm20 is offline Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default Binary Output Help!

    Hey there, im pretty new to java, and i've stumbled across a problem with one assignment. I need to "Save a “snapshot” of the situation say every 10 generations in a binary file".

    I've tried to use what i know, but if anyone could give me some pointers, that would be great.

    this is what i have so far.

    thanx

    Java Code:
    try {
               ObjectOutputStream outputstream = 
               new ObjectOutputStream(new FileOutputStream("binaryoutput.dat"));
               
               outputStream.writeObject(" " + temp + "             " + df.format(score) + " " +gen);
                    
               System.out.println("Numbers written to the file binaryoutput.dat");
               outputStream.close();
            }
            catch(IOException e) {
                System.out.println("Problem with file output.");

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default Don't cross post

    Don't cross post... it really pisses people off and you won't get any help.
    New To Java - Binary Output
    You were told in the other forum to post the exception(s) that you were getting and you didn't.
    If you feel that you HAVE to do it, then reference each forum in your posts. That way, people from both forums can see what has been suggested.

    With the info supplied, it would be difficult to help you. Post the complete code. Post the errors/exceptions you are getting. What output are you expecting vs what you're getting?

    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

Similar Threads

  1. get binary value
    By rushenas in forum New To Java
    Replies: 2
    Last Post: 06-14-2008, 01:51 PM
  2. binary conversion
    By thamizhisai in forum New To Java
    Replies: 3
    Last Post: 04-29-2008, 11:55 AM
  3. Binary Addition
    By Deo Favente in forum Advanced Java
    Replies: 11
    Last Post: 04-24-2008, 05:34 AM
  4. JSP- Binary output stream
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-29-2008, 09:06 AM
  5. binary search
    By tranceluv in forum New To Java
    Replies: 10
    Last Post: 01-14-2008, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •