aspose file tools*
The moose likes Java in General and the fly likes reading from the end of 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 » Java in General
Reply locked New topic

reading from the end of file

Asher Tarnopolski
Ranch Hand

Joined: Jul 28, 2001
Posts: 260
hey folks,
i have a huge log file (asci text) but i need to read in it only a number of last lines (the logs from the last day,beginning from the last line). i pretty hate all io stuff
didn't find any method in the api which lets me read lines from the end. is it any way to do it without reading all of the lines from the beginning?

Asher Tarnopolski
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Please do not cross post. Continue this conversation here.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: reading from the end of file
Similar Threads
How can I write a new record at the end of random access file of database?
reading from the end of file
reading in files
how to read text file backwards
Returning the last line in a file.