Here you can find the source of fileWriter(String outfile, String contents, boolean append)
public static void fileWriter(String outfile, String contents, boolean append)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /*********************************************************************** /*from w ww. j av a 2 s.c o m*/ Synopsis [ ] String to file, with append to file true/false option ***********************************************************************/ public static void fileWriter(String outfile, String contents, boolean append) { try { BufferedWriter bw = new BufferedWriter(new FileWriter(new File(outfile), append)); //append bw.write(contents); bw.close(); } catch (Exception e) { } } }