Adding into a file without Overwriting it

Hey everyone,

So, I'm working on a final project for my intro to Java course, and I've run into an issue. What my program does is, you (a teacher supposedly), enter a student's name either to create or modify the classes they're taking along with their CI (gpa) and other things.

Now the issue that I'm having is that. I made the program so that when you click the GUI to create a profile, it takes the first and last name, combines them, adds the extention .txt, and puts it in C:/. Now, once I create the file I want to just input the information the "teacher" puts in, instead of creating a new instance of the .txt document.

For example:

FileOutputStream x = new FileOutputStream(Name);

ObjectOutputStream b = new ObjectOutputStream(x);

b.writeObject(student);

where student is an object with fields such as one's grade and whatnot.

Can someone help? Thank you in advance!

[938 byte] By [shekya] at [2007-11-27 6:23:49]
# 1
[url http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileOutputStream.html#FileOutputStream(java.io.File, boolean)] http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileOutputStream.html#FileOutputStream(java.io.File, boolean)[/url]
jverda at 2007-7-12 17:42:05 > top of Java-index,Java Essentials,Java Programming...