Here you can find the source of loadList(File f, String enc)
public static List<String> loadList(File f, String enc) throws Exception
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static List<String> loadList(File f, String enc) throws Exception { List<String> ret = new ArrayList<String>(); BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f), enc)); try {/*from w w w. j av a2 s .c o m*/ String line = null; while ((line = br.readLine()) != null) { ret.add(line); } } finally { br.close(); } return ret; } }