Here you can find the source of save(String s, File file)
public static void save(String s, File file)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.PrintWriter; public class Main { public static void save(String s, File file) { try {//from ww w. j a v a 2s . c om PrintWriter out = new PrintWriter(file); out.println(s); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace(); } } }