commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [vfs] Restart function by using Commons VFS
Date Thu, 06 Oct 2005 08:41:22 GMT
Hi! wrote:
>1- Is it possible to perform FTP restart function when using
>VFS api ? (I know that the restart function is available in
>COMMONS NET by using the setRestartOffset(long offset) 
>method of the FTPClient class)
You can use the RandomAccessContent:

        FileObject fo = VFS.getManager().resolveFile("ftp://...");
        RandomAccessContent rac = 

If you need a InputStream you can aquire one by using:
        InputStream is = rac.getInputStream();

>2- Is it possible to perform SFTP restart function when
>using VFS api ? (I don't know if  the restart function is
>available in Jcraft Jsch)
The newest version of jsch allows such a "restart", but its current api 
isnt backward compatible so I cant drop it into VFS now.
Once this has been done you will use the same code as above.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message