aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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
Author

Reading the previous lines in a file

SriJyothsna Yeleswarapu
Greenhorn

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
Bartender

Joined: Oct 29, 2001
Posts: 8996
    
    9

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


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading the previous lines in a file