Use FileWriter with append flag = true
Example
File file = new File("hello.txt");
String data = "This content will append to the end of the file";
// true = append file
FileWriter fileWritter = new FileWriter(file.getName(),true);
BufferedWriter bufferWritter = new BufferedWriter(fileWritter);
bufferWritter.write(data);
bufferWritter.close();
No comments:
Post a Comment
Note: only a member of this blog may post a comment.