It's a little clearer this time around ... you can make a String array as a "buffer" of some number of lines. Read lines into the array and process the array. Repeat until you hit end of file.
I'm curious why a buffer of 10 or 100 or 1000 lines might be better than, say, 1. Read a line, process it. Java's BufferedReader already optimizes physical disk reads with buffering very much like the string array just so we don't have to worry about such things.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi