Here you can find the source of saveString(String filePath, String content)
public static void saveString(String filePath, String content)
//package com.java2s; //License from project: Apache License import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; public class Main { public static void saveString(String filePath, String content) { PrintWriter pw = null;//w w w . j a va 2s . c om boolean autoFlush = true; try { pw = new PrintWriter(new BufferedWriter(new FileWriter(filePath)), autoFlush); } catch (IOException e) { e.printStackTrace(); exit(1); } pw.print(content); pw.close(); } public static void exit(int status) { System.exit(status); } }