View Single Post
  #1 (permalink)  
Old 11-10-2007, 10:39 PM
bugger bugger is offline
Senior Member
 
Join Date: Nov 2007
Posts: 111
bugger is on a distinguished road
Text file over written
I am trying to learn file handling in Java. I want to append text to the end of a file and tried following script:

Code:
BufferedWriter out = new BufferedWriter(new FileWriter("C:\\myFile.txt")); out.write("aString"); out.close();
But the text file is overwritten. I know I can use RandomAccessFile to point to end of file and then append. Is this possible with BufferedWriter?
Reply With Quote
Sponsored Links