docs/doc/reference/com/google/android/exoplayer2/offline/DownloadRequest.Builder.html
Package com.google.android.exoplayer2.offline
Enclosing class:DownloadRequest
public static classDownloadRequest.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
A builder for download requests.
Constructors | Constructor | Description |
| --- | --- |
| Builder(String id, Uri uri) |
Creates a new instance with the specified id and uri.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| DownloadRequest | build() | |
| DownloadRequest.Builder | setCustomCacheKey(String customCacheKey) |
Sets the DownloadRequest.customCacheKey.
|
| DownloadRequest.Builder | setData(byte[] data) |
Sets the DownloadRequest.data.
|
| DownloadRequest.Builder | setKeySetId(byte[] keySetId) |
Sets the DownloadRequest.keySetId.
|
| DownloadRequest.Builder | setMimeType(String mimeType) |
Sets the DownloadRequest.mimeType.
|
| DownloadRequest.Builder | setStreamKeys(List<StreamKey> streamKeys) |
Sets the DownloadRequest.streamKeys.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Builder([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")id,[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri)
Creates a new instance with the specified id and uri.
-
@CanIgnoreReturnValue
public[DownloadRequest.Builder](DownloadRequest.Builder.html "class in com.google.android.exoplayer2.offline")setMimeType(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType)
Sets the DownloadRequest.mimeType.
-
@CanIgnoreReturnValue
public[DownloadRequest.Builder](DownloadRequest.Builder.html "class in com.google.android.exoplayer2.offline")setStreamKeys(@Nullable[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[StreamKey](StreamKey.html "class in com.google.android.exoplayer2.offline")> streamKeys)
Sets the DownloadRequest.streamKeys.
-
@CanIgnoreReturnValue
public[DownloadRequest.Builder](DownloadRequest.Builder.html "class in com.google.android.exoplayer2.offline")setKeySetId(@Nullable
byte[] keySetId)
Sets the DownloadRequest.keySetId.
-
@CanIgnoreReturnValue
public[DownloadRequest.Builder](DownloadRequest.Builder.html "class in com.google.android.exoplayer2.offline")setCustomCacheKey(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")customCacheKey)
Sets the DownloadRequest.customCacheKey.
-
@CanIgnoreReturnValue
public[DownloadRequest.Builder](DownloadRequest.Builder.html "class in com.google.android.exoplayer2.offline")setData(@Nullable
byte[] data)
Sets the DownloadRequest.data.
-
public[DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")build()