Here you can find the source of WriteFile(String filename, String content)
public static void WriteFile(String filename, String content) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { private static int createdFiles = 1; public static void WriteFile(String filename, String content) throws IOException { BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename))); writer.write(content);/*from ww w . j a v a 2s .c o m*/ writer.close(); System.out.println("[" + createdFiles + "] Created: " + filename); createdFiles++; } }