WritableDownloadIndexDefaultDownloadIndex@WorkerThread
public interface DownloadIndex
Downloads.| Modifier and Type | Method | Description |
|---|---|---|
Download |
getDownload(String id) |
Returns the
Download with the given id, or null. |
DownloadCursor |
getDownloads(int... states) |
@Nullable Download getDownload(String id) throws IOException
Download with the given id, or null.
This method may be slow and shouldn't normally be called on the main thread.
id - ID of a Download.Download with the given id, or null if a download state with this
id doesn't exist.IOException - If an error occurs reading the state.DownloadCursor getDownloads(@State int... states) throws IOException
DownloadCursor to Downloads with the given states.
This method may be slow and shouldn't normally be called on the main thread.
states - Returns only the Downloads with this states. If empty, returns all.Downloads with the given states.IOException - If an error occurs reading the state.