Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Want to append some text in the existing file  RSS feed

 
rajendra versha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is file "abc.txt" where i write first time with bufferedwriter.
when again i go to write in this file with append method then the whole file is being overwritten. So require help to append text in existing file.
 
Rob Spoor
Sheriff
Posts: 21044
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the FileReader and FileInputStream APIs. Both have a constructor that take a boolean to indicate whether or not to append. Set this to true and you will no longer overwrite your file.
 
rajendra versha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!