If the file exists, Java will automatically overwrite it.

If you wish to add lines to an existing file, you could always read it in and then write it back out again.
You can do a similar thing...