File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes Flushing BufferedReader Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "Flushing BufferedReader" Watch "Flushing BufferedReader" New topic
Author

Flushing BufferedReader

Roy Sin
Greenhorn

Joined: Mar 12, 2002
Posts: 10
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

Joined: Dec 03, 2001
Posts: 125
The easiest way I see would be to ignore lines that are made of just spaces.
Instead of

try
Roy Sin
Greenhorn

Joined: Mar 12, 2002
Posts: 10
Thanks for ur help...
 
 
subject: Flushing BufferedReader
 
Threads others viewed
reading an CSV file
Another method to break a string ???
How to Read a Flat File Data
sting tokenizer in a loop(vv urgent)
what's wrong with this code?
developer file tools