????4??Apache Commons IO??
???????????????Commons IO?????????????????????LineIterator:

 

LineIterator it = FileUtils.lineIterator(theFile?? "UTF-8");
try {
while (it.hasNext()) {
String line = it.nextLine();
// do something with line
}
} finally {
LineIterator.closeQuietly(it);
}

???????????????????????????????У??????????????????????????????????150MB??棩
????[main] INFO  o.b.java.CoreJavaIoIntegrationTest - Total Memory: 752 Mb
????[main] INFO  o.b.java.CoreJavaIoIntegrationTest - Free Memory: 564 Mb
????5??????
?????????????????????????????????????????′???????——???????????????????????????????
??????????Щ??????????????ζ??????????github?????????——???????????Eclipse???????????????ú??????????????С?