• Post Reply Bookmark Topic Watch Topic
  • New Topic

Flushing BufferedReader  RSS feed

 
Roy Sin
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i wuz just wondering if there is a way to really determine the end of file.
For e.g.
i have a text file containing data
a,a
b,b
c,c
d,d
e,e
the data should end at the char "e" but if i put 2 spaces below the "e". The program will continue till the spaces are read too...
here is my sample code. i am adding data into the database


my table will then show
a|a
b|b
c|c
d|d
e|e
e|e
e|e
how to get rid of this ??? hhheeelllppp !!!
thanks...
Roy
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way I see would be to ignore lines that are made of just spaces.
Instead of

try
 
Roy Sin
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur help...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!