Don't forget that FTP Servers may still answer and let you know that your session has timed out.
You wouldn't get a SocketTimeoutException in this case:
com.enterprisedt.net.ftp.FTPException: Timeout. Pay attention.
at
com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:5
72)
at
com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket
.java:385)
at
com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.jav
a:293)
at com.enterprisedt.net.ftp.FTPClient.initGet(FTPClient.java:1067)
A java.net.SocketTimeoutException will be trhown (subclass of IOException)
Bruce Blackshaw
EDT Support
How can I know in my program if the connection was aborted by FTP server? For example, if the timeout finishs, how can I know this?
Jorge