docs/doc/reference/com/google/android/exoplayer2/offline/Downloader.html
Package com.google.android.exoplayer2.offline
DashDownloader, HlsDownloader, ProgressiveDownloader, SegmentDownloader, SsDownloader[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceDownloader
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Downloads and removes a piece of content.
Nested Classes | Modifier and Type | Interface | Description |
| --- | --- | --- |
| static interface | Downloader.ProgressListener |
Deprecated.
Receives progress updates during download operations. |
All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | cancel() |
Deprecated.
Permanently cancels the downloading by this downloader.
|
| void | download(Downloader.ProgressListener progressListener) |
Deprecated.
Downloads the content.
|
| void | remove() |
Deprecated.
Removes the content. |
-
void download(@Nullable[Downloader.ProgressListener](Downloader.ProgressListener.html "interface in com.google.android.exoplayer2.offline")progressListener)
throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io"),[InterruptedException](https://developer.android.com/reference/java/lang/InterruptedException.html "class or interface in java.lang")
Deprecated.
Downloads the content.
If downloading fails, this method can be called again to resume the download. It cannot be called again after the download has been canceled.
If downloading is canceled whilst this method is executing, then it is expected that it will return reasonably quickly. However, there are no guarantees about how the method will return, meaning that it can return without throwing, or by throwing any of its documented exceptions. The caller must use its own knowledge about whether downloading has been canceled to determine whether this is why the method has returned, rather than relying on the method returning in a particular way.
Parameters:progressListener - A listener to receive progress updates, or null.Throws:IOException - If the download failed to complete successfully.InterruptedException - If the download was interrupted.CancellationException - If the download was canceled.
-
void cancel()
Deprecated.
Permanently cancels the downloading by this downloader. The caller should also interrupt the downloading thread immediately after calling this method.
Once canceled, download(com.google.android.exoplayer2.offline.Downloader.ProgressListener) cannot be called again.
-
void remove()
Deprecated.
Removes the content.