Here you can find the source of appendFile(String fileName, String content)
public static void appendFile(String fileName, String content) throws IOException
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static void appendFile(String fileName, String content) throws IOException { PrintWriter out = new PrintWriter(new BufferedWriter( new FileWriter(fileName, true))); out.println(content);/*from w w w.j ava 2 s . c o m*/ out.close(); } }