This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 8839
    
    7

Welcome to the JavaRanch, SriJyothsna.
Have a look at java.io.PushbackReader or java.io.RandomAccessFile 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: http://aspose.com/file-tools
 
subject: Reading the previous lines in a file
 
Similar Threads
Java Logger
Illegal constant pool type
Multiple Readers/Streams on a single file
Compare Two Text Files
VBScript to compare files... not really working