Here you can find the source of save(List
public static void save(List<String> list, String REPO)
//package com.java2s; /*//from w w w . j a va 2s. c o m * :mode=java:tabSize=4:indentSize=4:noTabs=true: * :folding=indent:collapseFolds=0:wrap=none:maxLineLen=120: * * $Source: /var/lib/cvsd/cvsrepo/invasion/nw/nexusbot/src/nexusbot/Utils.java,v $ * Copyright (C) 2007 Jeffrey Hoyt * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ import java.io.*; import java.util.*; public class Main { public final static String NEWLINE = System.getProperty("line.separator"); /** * DOCUMENT ME! */ public static void save(List<String> list, String REPO) { try { FileWriter out = new FileWriter(REPO); for (String s : list) { out.write(s); out.write(NEWLINE); } out.close(); } catch (IOException e) { System.err.println("Things not going as planned."); e.printStackTrace(); } // catch } }