2010. 7. 15. 16:21
Programming/Java
public void FileReader(String fname) throws IOException{
String a;
ArrayList<String> fstr = new ArrayList<String>();
File f = new File(fname);
try {
BufferedReader in = new BufferedReader(new FileReader(f));
while ((a=in.readLine()) != null){
fstr.add(a);
}
in.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
System.out.println("Error! File is not Founded.");
}
}