BufferedReader reader = new BufferedReader(new FileReader(filepath));
String tmp;
while((tmp=reader.readLine())!=null){
//check content
}
String tmp;
while((tmp=reader.readLine())!=null){
//check content
}
调试欢乐多
String line = null;
bool findit = false;
while ((line = reader.readLine()) != null) {
if (...) {
findit = true;
break;
}
}
if (findit) {
//找到了
} else {
//没找到
}