I want to read a file line by file to a specified seek position. It is easy to start reading from a certain seek position and read further till end.
RandomAccessFile f = new RandomAccessFile("file.txt","r")
f.seek(seek)
This set file reading position to given seek and start reading till that. How to read from the first line, line by line and stop reading ahead or seek position?