日期:2014-05-20 浏览次数:20742 次
public List<String> read() {
List<String> list = new ArrayList<String>();
String line = null;
try {
BufferedReader reader = new BufferedReader(new FileReader("e:/test.txt"));
while ((line = reader.readLine()) != null) {
list.add(line);
}
reader.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return list;
}