public interface Downloader
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Interrupts any current download operation and prevents future operations from running.
|
void |
download()
Downloads the media.
|
long |
getDownloadedBytes()
Returns the total number of downloaded bytes.
|
float |
getDownloadPercentage()
Returns the estimated download percentage, or
C.PERCENTAGE_UNSET if no estimate is
available. |
void |
remove()
Removes the media.
|
void download()
throws java.lang.InterruptedException,
java.io.IOException
DownloadException - Thrown if the media cannot be downloaded.java.lang.InterruptedException - If the thread has been interrupted.java.io.IOException - Thrown when there is an io error while downloading.void cancel()
long getDownloadedBytes()
float getDownloadPercentage()
C.PERCENTAGE_UNSET if no estimate is
available.void remove()
throws java.lang.InterruptedException
java.lang.InterruptedException - Thrown if the thread was interrupted.