I would like to append a new line to an existing file without erasing the current information of that file. In short, here is the methodology that I am using the current time:
output = new BufferedWriter(new FileWriter(my_file_name)); //clears file every time
you have to open the file in append mode, which can be achieved by using the
FileWriter(String fileName, boolean append) constructor.
output = new BufferedWriter(new FileWriter(my_file_name, true));
should do the trick