commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: [COMMONS.NET.FTP] How to know the current percent for a file uploading
Date Tue, 06 Dec 2005 17:21:05 GMT

>I must upload differents files on a FTP server and I wish to know how to
>obtain the current percent of the file transfer.

Use storeFileStream
(http://jakarta.apache.org/commons/net/apidocs/org/apache/commons/net/ftp/FTPClient.html#storeFileStream(java.lang.String)),
retrieveFileStream, or
appendFileStream depending on the nature of the transfer and keep track
of how many bytes you've written/read relative to the size of the file.

daniel

-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
    s a v a r e s e      # In distant lands, I hear the call of my home.
   software research     # Yet my work is not done.  My journey's just begun.
http://www.savarese.com/ #  -- http://www.sleepandthetraveller.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message