public List read(String path){
List list = new ArrayList();
try
{
String in=null;
FileInputStream fStream = new FileInputStream(path);
BufferedReader dInput = new BufferedReader(new InputStreamReader(fStream));
while (dInput.ready())
{
in = dInput.readLine();
System.out.println(in);
list.add(in);
}
dInput.close();
}
catch (Exception e)
{
System.err.println("There was a error : " + e.toString());
}
return list;
}
No comments:
Post a Comment