I am creating a text file using BufferedWriter
BufferedWriter bufferedWriter =
new BufferedWriter(new FileWriter("/home/user/temp.txt"));
/*
Add Contents using bufferedWriter.write()
*/
At certain places while adding contents I add a string sequence ######
Before I do bufferedWriter.close()
I want to replace the ###### sequence with some specific value.
How can I do that?
I do not want to re-open the Writer, but could use a different writer if it allows this to be done.