private static List<String>
readFileToStringList(String filePath) {
List<String> returnList = new ArrayList<String>();
try {
FileReader fr = new FileReader(filePath);
BufferedReader br = new BufferedReader(fr);
String
line;
while ((line =
br.readLine()) != null) {
System.out.println(line);
returnList.add(line);
}
} catch (Exception e) {
e.printStackTrace();
}
return returnList;
}
沒有留言:
張貼留言