Improve support for resuming downloads from external files
|Reported by:||Nicklas Nordborg||Owned by:||everyone|
The BASE core has support for resuming a file download. This is implemented as calling
File.getDownloadStream(offset). In most cases this works well. Local files can simply skip reading the specified number of bytes. But for external files the situation may be different. The default
skip implementation simply read the specified number of bytes (which in our case may result in a complete download of the file).
But some protocols have the possibility to specify a start offset (eg FTP) so in this case it would be better to let the remote end handle this.
I think we should add a new interface,
ResumableConnectionManager, as a sub-interface to
ConnectionManager. The new interface need a single method
getInputStream(long offset) and should be implemented by extension that build on protocols that support offsets.