Jakarta common/net FTP - setRestartOffset - Upload Resume...



Hi all,

I have tried to understand how to resume an upload or download using
the FTPClient API from Jakarta common net libraries.

1- I started by uploading a file on the FTP server then I interupted
the upload in the middle (after for example 790000 bytes) :

FTPClient ftp=new FTPClient();
....
input = new FileInputStream("fileSourceName");
output = ftp.storeFileStream("fileTargetName");
....
Util.copyStream(input, output);

2- I restart the program but I have added a line of code that describe
an offset:

FTPClient ftp=new FTPClient();
ftp.setRestartOffset(790000);

3- I was expecting that the download will restart from the offset
instead the file upload starts from beginning...

a- In fact i checked the Util.copystream method, i cannot see any use
of the offset or is it simply handled by the FTP server?

b-I'm just wonderinfg thatif it is handled by the FTP server,
how does the FTP server knows where to start etc.. if the connection is
restarted...

c-if anyone has succesfully written the code that handles the "resume"
functionnality, it would be nice to see some code snippet.

Many Thanks!

.



Relevant Pages

  • RE: nix based ftp server suggestions
    ... I am playing with vsftpd right now. ... When I mean easy to manage, I need an ftp server so that some of our users ... can upload download large files to collaborate with people not in our ... by non tech users(ie marketing needs to give Graphics Co. X access to upload ...
    (Security-Basics)
  • Re: clientless windowsbased sftp / ssh server?
    ... > maybe run a secure http webserver instead of ftp server since ie6 ... > webserver then I think I can only download from it, ... No, you can upload too. ...
    (comp.security.ssh)
  • Re: help with permissions
    ... > i simply need to work out some permissions for my new ftp server. ... > read contents of pub and uploads but not download or delete ... to 'put stuff in upload'. ...
    (comp.os.linux.misc)
  • Re: FTP Server for Windows CE 5.0
    ... IF i want that upload and download only one use from and to my FTP server ... is it possible download and upload from an to my ftp folder? ...
    (microsoft.public.windowsce.platbuilder)
  • RE: sharing info between Access and a website
    ... The website is mostly updated by end users with a store ... server via FTP, replacing the existing file. ... before the upload process. ... I'd like to download those changes into Access, ...
    (microsoft.public.access.modulesdaovba)