String filePath = "foo.txt";
BufferedReader br = new BufferedReader(
new InputStreamReader(
new FileInputStream(filePath), "UTF8"));
String str;
while ((str = br.readLine()) != null) {
// do something with each line
...
}
in.close(); // put this in a finally block
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment