2 different methods called at 2 different times for 2 different reasons to do 2 different things.
Before you were overwriting the file every time. Now you are appending every time. Adjust the code...
Type: Posts; User: jps
2 different methods called at 2 different times for 2 different reasons to do 2 different things.
Before you were overwriting the file every time. Now you are appending every time. Adjust the code...
Suggestion? Read the documentation for both classes and choose the one that fits your needs best.
Tips? Yea when it boils down in the end it really does not matter too much right now HOW* you do...
Read the file, if it exists, and if there is not a blank line at the end, add a newline character first?
...and what did the Oracle Documentation say about the use of the FileOutputStream class and:
public FileOutputStream(String name, boolean append)