Here you can find the source of save(File pFile, String pString)
public static boolean save(File pFile, String pString)
//package com.java2s; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.Vector; public class Main { public static Vector Exception = new Vector(); public static boolean save(File pFile, String pString) { if (pFile == null) return false; FileWriter out = null;/* w w w .ja va2 s . c o m*/ BufferedWriter buf = null; try { out = new FileWriter(pFile); buf = new BufferedWriter(out); buf.write(pString); } catch (Exception e) { return false; } finally { try { if (buf != null) buf.close(); if (out != null) out.close(); } catch (Exception e) { return false; } } return true; } }