Package org.scijava.download
Class DefaultDownloadService
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- org.scijava.download.DefaultDownloadService
-
- All Implemented Interfaces:
Comparable<Prioritized>,Contextual,Disposable,DownloadService,Identifiable,Initializable,Locatable,Logged,HasPluginInfo,RichPlugin,SciJavaPlugin,Prioritized,SciJavaService,Service,Versioned
public class DefaultDownloadService extends AbstractService implements DownloadService
Default implementation ofDownloadService.- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description DefaultDownloadService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Downloaddownload(Location source, Location destination)Downloads data from the given source, storing it into the given destination.Downloaddownload(Location source, Location destination, LocationCache cache)Downloads data from the given source, storing it into the given destination.-
Methods inherited from class org.scijava.service.AbstractService
getContext, setContext, toString
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
download
public Download download(Location source, Location destination)
Description copied from interface:DownloadServiceDownloads data from the given source, storing it into the given destination.- Specified by:
downloadin interfaceDownloadService- Parameters:
source- The location of the needed data.destination- The location where the needed data should be stored.
-
download
public Download download(Location source, Location destination, LocationCache cache)
Description copied from interface:DownloadServiceDownloads data from the given source, storing it into the given destination.- Specified by:
downloadin interfaceDownloadService- Parameters:
source- The location of the needed data.destination- The location where the needed data should be stored.cache- The cache from which already-downloaded data should be pulled preferentially, and to which newly-downloaded data should be stored for next time.
-
-