Here you can find the source of writeStringToFile(File file, String content)
public static void writeStringToFile(File file, String content) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; public class Main { public static void writeStringToFile(File file, String content) throws IOException { BufferedWriter writer = new BufferedWriter(new FileWriter(file, true));/* ww w . ja v a 2 s . c o m*/ writer.write(content); writer.close(); } }