commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anamika ." <aanamika...@yahoo.com>
Subject [Net] FTP : Connection failure exception
Date Mon, 11 Sep 2006 11:34:00 GMT
Hello,
   
  I am writing a small code for FTP download. I am using retrieveFile method to download file.

   
  FileOutputStream fos = new FileOutputStream(LocalFileName);
  try
  {
              ftp.retrieveFile(RemoteFileName,fos);
  }
  catch(Exception e)
  {
              System.out.println(e.getMessage());      
  }
   
  On windows I get exception if connection breaks in between. But I am not getting any exception
on Linux. It doesn't recognise connection failure. Program just remains in the state where
it is. 
   
  I am using commons.net 1.4.0 and red had linux enterprise 4. 
   
  Please tell me how to handle connection failure on linux. Why it is not giving any exception
? Why this different behaviour on different platforms ?
   
  Thanks and Regards,
  Anamika

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message