Here you can find the source of appendFile(final String filename, final String content)
public static void appendFile(final String filename, final String content) throws IOException
//package com.java2s; //License from project: Apache License import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { public static void appendFile(final String filename, final String content) throws IOException { FileOutputStream output = new FileOutputStream(filename, true); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output)); writer.write(content);/*from ww w .j a v a 2s. c om*/ writer.close(); output.close(); } }