Here you can find the source of appendFile(File file, String url)
Parameter | Description |
---|---|
file | a parameter |
url | a parameter |
public static void appendFile(File file, String url)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileWriter; import java.io.IOException; public class Main { /**/* w ww . j a va 2 s.c o m*/ * * @param file * @param url */ public static void appendFile(File file, String url) { FileWriter fw; try { fw = new FileWriter(file, true); // This is true is the key , If not, the evaluation will be a blank file overwrite originals fw.write(url); fw.close(); } catch (IOException e) { e.printStackTrace(); } } }