A way to save setting using FileWriter

Hi im making a terminal window for a server program I抦 developing and ik wanted to be able to set preferences for the terminal windows such ass what will be displayed and what not and what colot the letter are. And I want those setting to be able to be saved. I was thinking of a simple txt with some number like 1 for display and 0 for don抰 display. This is al working great but when I save setting I don抰 know how to overwrite the text that was already in the file so if someone knows the answer i would realy appreciate that, or if you have a better solution for making a setting file please tell me

[609 byte] By [kryptonite88a] at [2007-11-27 0:23:50]
# 1
Class java.util.prefs.Preferences
sabre150a at 2007-7-11 22:19:56 > top of Java-index,Core,Core APIs...
# 2
Do the pref stay saved if i my program ends becouse when i exit the program and start it up again in 5 month's i want my setting to still be there.
kryptonite88a at 2007-7-11 22:19:56 > top of Java-index,Core,Core APIs...
# 3
Your prefs will be saved after every reboot.Your prefs won't be saved if you (or somebody else) erase them, or format the disk.
ThePeacha at 2007-7-11 22:19:56 > top of Java-index,Core,Core APIs...