This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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: 9048

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