I\'m working on writing a program to download very large files (~2GB) from a server. I\'ve written the program to be able to resume partially finished downloads,
In
See http://thushw.blogspot.com/2010/10/java-urlconnection-provides-no-fail.html for code to handle this situation
Edited: actually, setting a Socket timeout (in milliseconds) using setSoTimeout (as suggested in the link comment from Joop Eggen) is probably better.
setSoTimeout