Here you can find the source of appendFile(String filename, String text)
public static void appendFile(String filename, String text)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static void appendFile(String filename, String text) { FileWriter fw = null;/*from ww w . j av a2s . com*/ try { fw = new FileWriter(filename, true); fw.append(text); } catch (IOException e) { e.printStackTrace(); } finally { try { if (fw != null) fw.close(); } catch (IOException e) { e.printStackTrace(); } } } }