File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Reading the previous lines in a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Reading the previous lines in a file " Watch "Reading the previous lines in a file " New topic

Reading the previous lines in a file

SriJyothsna Yeleswarapu

Joined: Jan 16, 2006
Posts: 1
Is there some way to skip to the previous lines in a file, besides customizing the readLine() method for it?
I intend to skip to previous lines in a text file after having reached a position by a binary search on some element in it.
Joe Ess

Joined: Oct 29, 2001
Posts: 8708

Welcome to the JavaRanch, SriJyothsna.
Have a look at or and see if they will meet your requirements.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Reading the previous lines in a file
Similar Threads
Illegal constant pool type
Java Logger
VBScript to compare files... not really working
Multiple Readers/Streams on a single file
Compare Two Text Files