Opened 10 years ago

Closed 10 years ago

#1820 closed enhancement (fixed)

Improve support for resuming downloads from external files

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.3
Component: core Version:
Keywords: Cc:


The BASE core has support for resuming a file download. This is implemented as calling InputStream.skip(offset) in 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.

Change History (1)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [6493]) Fixes #1820: Improve support for resuming downloads from external files

Added ResumableConnectionManager and implemented this for the built-in HttpConnectionManager.

Note: See TracTickets for help on using tickets.