To append to existing file use FileWriter
with append = true argument in constructor:
FileWriter fileWriter= new FileWriter(fileName,true);
BufferedWriter bufferWriter = new BufferedWriter(fileWriter);
bufferWriter.write(inputString);
bufferWriter.close();
Read more about FileWriter
here
solved writing and reading a txt content using java