amar

Greenhorn
+ Follow
since Sep 08, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by amar

This doesn't happen all the time, only once in a while.

The program freezes, it seems like it gets stuck at:

buffReader.readLine()
16 years ago
I am using FTPClient to read from a file on the FTP server.

fileStream = ftpClient.retrieveFileStream(File)

buffReader = new BufferedReader(new InputStreamReader(fileStream));

I am using this while loop to read trough the file:

while((lineRead = buffReader.readLine()) != null)
{
if(lineRead.toUpperCase().equals("END"))
break;
}

The end of the file is marked by a string "END"
it is definitely not a binary file.

Once in a while program hangs while reading.
The program doesn't exit but rather stays up and running, but never gets past this line. It doesn't even timeout(I hve set the time out to 2 minutes). neither does it throw any exception.

I do catch the socketException and IOException

Can anyone suggest what must be happening?

Thanks
16 years ago
I am using FTPClient to read from a file on the FTP server.

fileStream = ftpClient.retrieveFileStream(File)

buffReader = new BufferedReader(new InputStreamReader(fileStream));

I am using this while loop to read trough the file:

while((lineRead = buffReader.readLine()) != null)
{}


Once in a while program hangs while reading.
The program doesn't exit but rather stays up and running, but never gets past this line. It doesn't even timeout(I hve set the time out to 2 minutes). neither does it throw any exception.

I do catch the socketException and IOException

Can anyone suggest what must be happening?

Thanks
16 years ago