Resume halted download

I have plans of developing an application wherein one of its features is it will automatically go through a specified web site and look for new updates, then downloads the updated files in that site. If however during the download period the process is halted by the next time it go through the site it resumes the halted download. Is it possible with Java? Thanks in advance.

[383 byte] By [Mikhael@sun] at [2007-11-26 10:37:17]
# 1

Hi,

If you are keeping the file downloaded from the external server onto a highly available

filesystem, then it should be possible. With the FTP protocol, there is a built-in

command to re-start an interrupted FTP data session at the exact byte boundary where

it was interrupted. That byte marker is computed by looking at the size of the

(incomplete) file which remains on the filesystem on the client.

You want java on the client and on the server, your scenario calls for a web-server.

That makes it tricky, because AFAIK, the HTTP protocol does not have such a

built-in mechanism to restart an interrupted HTTP transfer.

If you can deploy your own little Servlet on the server, this becomes easy, of course.

This is how various "Download manager Tools" work. Is that the type of scenario

you are looking at?

HTH,

-ashu

ashu15 at 2007-7-7 2:48:16 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...