aspose file tools*
The moose likes I/O and Streams and the fly likes how can i count the blank lines in a text file using stream tokenizer? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how can i count the blank lines in a text file using stream tokenizer?" Watch "how can i count the blank lines in a text file using stream tokenizer?" New topic
Author

how can i count the blank lines in a text file using stream tokenizer?

Mac Santos
Greenhorn

Joined: Aug 30, 2007
Posts: 1
hi guys I'm parsing a text file using a stream tokenizer that contains

1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
<---how can i count these blank line
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
<---how can i count these blank line
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111
1011111111111 1011111111111

i need to output the ff: based on the text file
this should be the correct
rows: 5 <--- im having a problem with this value???
cols: 13 <-- created a method already using st.sval.length()
panel cols: 2 <-- created a method by counting the tokens per line
panel rows 3 <-- im having a problem with this value???





here is the code





thanks !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can i count the blank lines in a text file using stream tokenizer?
 
Similar Threads
StreamTokenizer help
should be simple....reading char...
StreamTokeniser Trouble
Arivazhagan
writing unicode to a file