Here you can find the source of saveLine(File file, String line)
public static void saveLine(File file, String line) throws FileNotFoundException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; public class Main { public static void saveLine(String path, String line) throws FileNotFoundException { saveLine(new File(path), line); }/* w w w.ja va2s. com*/ public static void saveLine(File file, String line) throws FileNotFoundException { PrintWriter output = new PrintWriter(file); output.print(line); output.close(); } }