Interface ResourceDownloader
- All Known Implementing Classes:
ResourceDownloaderAlternateImpl
,ResourceDownloaderBaseImpl
,ResourceDownloaderDelayedImpl
,ResourceDownloaderErrorImpl
,ResourceDownloaderFileImpl
,ResourceDownloaderMetaRefreshImpl
,ResourceDownloaderRetryImpl
,ResourceDownloaderTimeoutImpl
,ResourceDownloaderTorrentImpl
,ResourceDownloaderURLImpl
public interface ResourceDownloader
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Asynchronously download.void
cancel()
Cancel the download.download()
Synchronously download.getClone()
getName()
Get a sensible name for the download based on its details (e.g.getProperty
(String name) Warning! URL response properties have a type of 'List of String'long
getSize()
Attempts to get the size of the download.boolean
void
void
reportActivity
(String activity) void
setProperty
(String name, Object value)
-
Field Details
-
PR_STRING_CONTENT_TYPE
- See Also:
-
PR_BOOLEAN_ANONYMOUS
- See Also:
-
-
Method Details
-
getName
String getName()Get a sensible name for the download based on its details (e.g. URL)- Returns:
-
download
Synchronously download. Events are still reported to listeners- Returns:
- Throws:
ResourceDownloaderException
-
asyncDownload
void asyncDownload()Asynchronously download. -
getSize
Attempts to get the size of the download. Returns -1 if the size can't be determined.Note: You must not call this method from the reportActivity callback method.
- Throws:
ResourceDownloaderException
-
setProperty
- Throws:
ResourceDownloaderException
-
getProperty
Warning! URL response properties have a type of 'List of String'- Parameters:
name
-- Returns:
- Throws:
ResourceDownloaderException
-
cancel
void cancel()Cancel the download. -
isCancelled
boolean isCancelled() -
getClone
ResourceDownloader getClone() -
reportActivity
-
addListener
-
removeListener
-