commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: VFS ranged downloads?
Date Mon, 14 Feb 2005 21:04:05 GMT
Marcus Crafter wrote:
> Hope all is going well.
> Was just wondering if it's possible to perform a range requested 
> donwload using commons VFS currently? I checked out the API but didn't 
> see anything that allowed one to specify a start byte and range, etc.
There is a RandomAccessContent which makes it possible to access every 
file in an random manner. Though, it wasnt implemented for FTP (now it is).

FileObject fo = 
RandomAccessContent ra = 


InputStream is = ra.getInputStream();

Well - thats it. Using seek() you could set what ftp calls 
"restartOffset" (REST)

I have to do some tests and will commit it in the next few days.


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

View raw message