|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DownloadServices
| Method Summary | |
|---|---|
Downloader |
download(File incompleteFile)
Starts a resume download for the given incomplete file. |
Downloader |
download(MagnetOptions magnet,
boolean overwrite)
Creates a downloader for a magnet. |
Downloader |
download(MagnetOptions magnet,
boolean overwrite,
File saveDir,
String fileName)
Creates a downloader for a magnet using the given additional options. |
Downloader |
download(RemoteFileDesc[] files,
boolean overwrite,
GUID queryGUID)
|
Downloader |
download(RemoteFileDesc[] files,
GUID queryGUID,
boolean overwrite,
File saveDir,
String fileName)
Stub for calling download(RemoteFileDesc[], DataUtils.EMPTY_LIST, boolean) |
Downloader |
download(RemoteFileDesc[] files,
List<? extends RemoteFileDesc> alts,
GUID queryGUID,
boolean overwrite)
|
Downloader |
download(RemoteFileDesc[] files,
List<? extends RemoteFileDesc> alts,
GUID queryGUID,
boolean overwrite,
File saveDir,
String fileName)
Tries to "smart download" any [sic] of the given files. |
Downloader |
downloadFromStore(RemoteFileDesc rfd,
boolean overwrite,
File saveDir,
String fileName)
Creates a downloader for songs purchased from the LimeWire Store (LWS) |
Downloader |
downloadTorrent(BTMetaInfo info,
boolean overwrite)
Starts a torrent download for a given Inputstream to the .torrent file |
int |
getNumActiveDownloads()
Returns the number of active downloads. |
int |
getNumDownloads()
Returns the number of downloads in progress. |
boolean |
hasActiveDownloads()
Returns whether there are any active internet (non-multicast) transfers going at speed greater than 0. |
| Method Detail |
|---|
Downloader download(File incompleteFile)
throws CantResumeException,
SaveLocationException
CantResumeException - incompleteFile is not a valid
incomplete file
SaveLocationException
Downloader download(MagnetOptions magnet,
boolean overwrite,
File saveDir,
String fileName)
throws SaveLocationException
magnet - provides the information of the file to download, must be
validoverwrite - whether an existing file a the final file location
should be overwrittensaveDir - can be null, then the save directory from the settings
is usedfileName - the final filename of the download, can be
null
SaveLocationException
IllegalArgumentException - if the magnet is not
downloadable.
Downloader download(MagnetOptions magnet,
boolean overwrite)
throws SaveLocationException
magnetprovides - the information of the file to download, must be
validoverwrite - whether an existing file a the final file location
should be overwritten
SaveLocationException
IllegalArgumentException - if the magnet is not
valid.
Downloader downloadFromStore(RemoteFileDesc rfd,
boolean overwrite,
File saveDir,
String fileName)
throws SaveLocationException
store - - provides information of the file to download including a URNoverwrite - - whether an existing file with the same name should be overwrittensaveDir - - location to store the completed download to, this may be different than
downloads from gnutellafileName - - name of the file once completed
SaveLocationException
Downloader download(RemoteFileDesc[] files,
boolean overwrite,
GUID queryGUID)
throws SaveLocationException
SaveLocationException
Downloader download(RemoteFileDesc[] files,
GUID queryGUID,
boolean overwrite,
File saveDir,
String fileName)
throws SaveLocationException
SaveLocationException
Downloader download(RemoteFileDesc[] files,
List<? extends RemoteFileDesc> alts,
GUID queryGUID,
boolean overwrite)
throws SaveLocationException
SaveLocationException
Downloader download(RemoteFileDesc[] files,
List<? extends RemoteFileDesc> alts,
GUID queryGUID,
boolean overwrite,
File saveDir,
String fileName)
throws SaveLocationException
If any of the files already being downloaded (or queued for downloaded) has the same temporary name as any of the files in 'files', throws SaveLocationException. Note, however, that this doesn't guarantee that a successfully downloaded file can be moved to the library.
If overwrite==false, then if any of the files already exists in the download directory, SaveLocationException is thrown and no files are modified. If overwrite==true, the files may be overwritten.
Otherwise returns a Downloader that allows you to stop and resume this download. The ActivityCallback will also be notified of this download, so the return value can usually be ignored. The download begins immediately, unless it is queued. It stops after any of the files succeeds.
files - a group of "similar" files to smart downloadalts - a List of secondary RFDs to use for other sourcesqueryGUID - guid of the query that returned the results (i.e. files)overwrite - true iff the download should proceedewithout
checking if it's on disksaveDir - can be null, then the save directory from the settings
is usedfileName - can be null, then one of the filenames of the
files array is used
array is used
SaveLocationException - if there is an error when setting the final
file location of the downloadDownloadManager#getFiles(RemoteFileDesc[], boolean)
Downloader downloadTorrent(BTMetaInfo info,
boolean overwrite)
throws SaveLocationException
is - the InputStream belonging to the .torrent file
IOException - in case there was a problem reading the file
SaveLocationExceptionboolean hasActiveDownloads()
int getNumActiveDownloads()
int getNumDownloads()
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||