File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mac Santos
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic