This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes using linereader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using linereader" Watch "using linereader" New topic

using linereader

Puneet N Vyas
Ranch Hand

Joined: Sep 20, 2007
Posts: 61
we can know the number of lines a file contents via simple logic,but how can i use Linereader to know the current number of line we are in a text file....

thanks for support
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

A search for "linereader" turns up over 16,000 hits. Perhaps you can narrow down which linereader you are using?
Chances are you will have to keep a local count of lines if you want to know which line you are on.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Rob Spoor

Joined: Oct 27, 2005
Posts: 19649


How To Ask Questions How To Answer Questions
jQuery in Action, 2nd edition
subject: using linereader
Similar Threads
A kinder, gentler API for reading lines
CSV help
while is while( ! done ) better?
Simple tail utility
reading SMTP mail text file