martes, junio 14, 2011

Read a text file line by line in Java

///
/// read the file line by line
///
try {
 BufferedReader in = new BufferedReader(new FileReader(args[0]));
 String str;
 while ((str = in.readLine()) != null) {
  _log(str);
 }
 in.close();
} catch (IOException e) {
}

No hay comentarios: