you have to open the file in append mode, which can be achieved by using the FileWriter(String fileName, boolean append)
constructor.
output = new BufferedWriter(new FileWriter(my_file_name, true));
should do the trick
More Related Contents:
- Unable to read a file
- Reading a plain text file in Java
- How can I lock a file using java (if possible)
- How do I check if a file exists in Java?
- Read/Write String from/to a File in Android
- java.io.FileNotFoundException: the system cannot find the file specified
- Check if file is already open
- How do you determine the ideal buffer size when using FileInputStream?
- How to create a temporary directory/folder in Java?
- Delete directories recursively in Java
- getResourceAsStream returns null
- Is this the best way to rewrite the content of a file in Java?
- Is it necessary to close each nested OutputStream and Writer separately?
- Java : Read last n lines of a HUGE file
- Java io ugly try-finally block
- How to tell why a file deletion fails in Java?
- How can I save a file to the class path [closed]
- Fastest way to sum integers in text file
- How do relative file paths work in Eclipse?
- Write I/O file to shared network drive using credentials
- How does FileLock work?
- Read/write .txt file with special characters
- How to append data to a file?
- How to read text file from classpath in Java?
- Java PrintWriter not working
- Write to a file stream returned from getResourceAsStream()
- Fastest way of reading relatively huge byte-files in Java
- Alternative to File.exists() in Java
- Does collect operation on Stream close the stream and underlying resources?
- Using reflection to change static final File.separatorChar for unit testing?