Reading the Files..
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vinatha_Kandikattu
Posted On:   Thursday, May 24, 2001 09:21 AM

Hello, I am trying to read a .txt file which was manually created
in a JAVA program. I am using a RandomAccessFile class to read the
file. For some reason, even though i have the EOF(cntrl-Z) in the manually
created txt file the program is not able to detect it. Can anyone tell me
which would be a best way dealing with the .txt files?

Thank you
Vinatha

Re: Reading the Files..

Posted By:   Anonymous  
Posted On:   Thursday, May 24, 2001 09:32 AM

Why are you using RandomAccessFile? UNless there are specific reasons (need of a file pointer) I would suggest you to use a Reader, that it's more appropriate.

Can you post the code (please format it using
 where you are catching the EOFException ? That's the suggested way to check for the end of file and it normally works.

Regards.
About | Sitemap | Contact