LineNumberReader question?

Alright some of you may have seen my post earlier today: http://forum.java.sun.com/thread.jspa?threadID=5133146&messageID=9482798#9482798

After talking with my professor and getting more details I decided to scrap what I wrote and start all over again. For those that don't know or have forgotten I'm attempting to write a program that counts lines of code that are not commented and are none blank lines.

I decided to use the BufferedReader this time. While double checking with the API that I had used it right I noticed LineNumberReader.

I'm curious as to if I write something like this would it work for what I'm attempting to do?

BufferedReader file=new BufferedReader(new FileReader(filename));

count=file.getLineNumber();

Then have some code that takes out lines out of count if there is a blank space or comment lines.

[947 byte] By [davegelha] at [2007-11-26 17:34:00]
# 1
getLineNumber() returns the line number of the current line, so it's only the total nuber of lines when you've read the entire file.
ejpa at 2007-7-9 0:02:00 > top of Java-index,Java Essentials,New To Java...
# 2
Okay thanks, I knew it wouldn't be that easy. Luckily I though of another way to do it thanks to a classmate.
davegelha at 2007-7-9 0:02:00 > top of Java-index,Java Essentials,New To Java...