Here you can find the source of writeFile(String pContent, String pPath)
public static void writeFile(String pContent, String pPath)
//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 writeFile(String pContent, String pPath) { File file = new File(pPath); FileWriter fstream;/* w ww . j av a2 s. c om*/ try { fstream = new FileWriter(file); try (BufferedWriter out = new BufferedWriter(fstream)) { out.write(pContent); } } catch (IOException e) { System.err.println("Error: " + e.getMessage()); } } }