aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using linereader" Watch "using linereader" New topic
Author

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
Bartender

Joined: Oct 29, 2001
Posts: 8912
    
    8

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
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Use java.io.LineNumberReader.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using linereader