Interface DownloadIndex
-
- All Known Subinterfaces:
WritableDownloadIndex
- All Known Implementing Classes:
DefaultDownloadIndex
@WorkerThread @Deprecated public interface DownloadIndex
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.An index ofDownloads
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Download
getDownload(String id)
Deprecated.Returns theDownload
with the givenid
, or null.DownloadCursor
getDownloads(@com.google.android.exoplayer2.offline.Download.State int... states)
Deprecated.
-
-
-
Method Detail
-
getDownload
@Nullable Download getDownload(String id) throws IOException
Deprecated.Returns theDownload
with the givenid
, or null.This method may be slow and shouldn't normally be called on the main thread.
- Parameters:
id
- ID of aDownload
.- Returns:
- The
Download
with the givenid
, or null if a download state with this id doesn't exist. - Throws:
IOException
- If an error occurs reading the state.
-
getDownloads
DownloadCursor getDownloads(@State @com.google.android.exoplayer2.offline.Download.State int... states) throws IOException
Deprecated.Returns aDownloadCursor
toDownload
s with the givenstates
.This method may be slow and shouldn't normally be called on the main thread.
- Parameters:
states
- Returns only theDownload
s with this states. If empty, returns all.- Returns:
- A cursor to
Download
s with the givenstates
. - Throws:
IOException
- If an error occurs reading the state.
-
-