File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes adding to files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "adding to files" Watch "adding to files" New topic

adding to files


Joined: Nov 26, 2003
Posts: 10
how do i add something to files so that the old data is not overwrited??
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

FileOutputStream(String name, boolean append)
FileWriter(String name, boolean append)
with true as the second argument.

[How To Ask Questions On JavaRanch]
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Thank you for changing your name from COOL angel! However, according to the naming policy, you must have a first and a last name. It doesn't have to be your real last name, just a real looking one. Please head over here and make this last change.
I agree. Here's the link:
subject: adding to files
jQuery in Action, 3rd edition