Methods Summary |
---|
public ResourceDownloader | create(java.io.File file)Creates a downloader for a local file - in particular this is useful for installing a plugin
from a local file as the installer required ResourceDownloader instances to operate
|
public ResourceDownloader | create(java.net.URL url, java.lang.String postData)
|
public ResourceDownloader | create(java.net.URL url)creates a basic downloader. current url must be http or https
|
public ResourceDownloader | create(java.net.URL url, java.lang.String user_name, java.lang.String password)
|
public ResourceDownloader | create(ResourceDownloaderDelayedFactory factory)creates a downloader that will be asked to create a ResourceDownloader
when required. Useful when used in combination with an alternate downloader
so that time isn't wasted creating downloaders for subsequent possibilities
if the first one succeeds
|
public ResourceDownloader | getAlternateDownloader(ResourceDownloader[] downloaders)gets a downloader that will cycle through a list of downloaders until
a download succeeds
|
public ResourceDownloader | getAlternateDownloader(ResourceDownloader[] downloaders, int max_to_try)
|
public ResourceDownloader | getMetaRefreshDownloader(ResourceDownloader downloader)gets a downloader that will automatically follow META refresh tags
Will only do a single level of indirection
|
public ResourceDownloader | getRandomDownloader(ResourceDownloader[] downloaders, int max_to_try)
|
public ResourceDownloader | getRandomDownloader(ResourceDownloader[] downloaders)an alternative downloader that randomises the downloaders
|
public ResourceDownloader | getRetryDownloader(ResourceDownloader downloader, int retry_count)gets a downloader that will retry a number of times before failing
|
public ResourceDownloader | getSuffixBasedDownloader(ResourceDownloader downloader)Returns a downloader that does something sensible based on the url suffix.
In particular will return a torrent downloader if the URL ends with ".torrent"
The decision is made based on a random child downloader, so don't mix URL
suffixes below this point in the hierarchy
|
public ResourceDownloader | getTimeoutDownloader(ResourceDownloader downloader, int timeout_millis)gets a downloader that will timeout after a given period
|
public ResourceDownloader | getTorrentDownloader(ResourceDownloader downloader, boolean persistent)Given a downloader that will download a torrent, this will download
the torrent data itself. Note that the torrent MUST contain only a
single file (although a future enhancement may return a ZIP input stream
for multi-file torrents)
|
public ResourceDownloader | getTorrentDownloader(ResourceDownloader downloader, boolean persistent, java.io.File download_directory)Download a torrent's data to the given download location
|