Java Read File Line by Line - Java Tutorial
In the tutorial I will explain you how to read a text file in Java line by
line using the DataInputStream class of the Java API. The DataInputStream class
used along with the BufferedReader for reading the file line by line. There are
many benefits of reading the file line by line. If you read the file line by
line then there will be less requirement of the memory.