This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "adding to files" Watch "adding to files" New topic
Author

adding to files

Tersa
Greenhorn

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

Joined: Oct 29, 2001
Posts: 8836
    
    7

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


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Tersa,
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.
Thanks!
 
jQuery in Action, 2nd edition
 
subject: adding to files
 
Similar Threads
Need to Convert Documents to HTML
WA #1.....word association
Componentized logic in views - what to use.
ClassNotFoundException in Jsp Precompilation
How to create a war file.