Package com.google.android.exoplayer2.offline

## Class DownloadRequest.Builder

- java.lang.Object
- - com.google.android.exoplayer2.offline.DownloadRequest.Builder

- Enclosing class:
    DownloadRequest

      public static class DownloadRequest.Builder
      extends Object

  A builder for download requests.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder​(String id, Uri uri)` | Creates a new instance with the specified id and uri.

  - ### Method Summary

    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`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder​(String id,
                         Uri uri)

      Creates a new instance with the specified id and uri.

  - ### Method Detail

    - #### setMimeType

          public DownloadRequest.Builder setMimeType​(@Nullable
                                                     String mimeType)

      Sets the `DownloadRequest.mimeType`.

    - #### setStreamKeys

          public DownloadRequest.Builder setStreamKeys​(@Nullable
                                                       List<StreamKey> streamKeys)

      Sets the `DownloadRequest.streamKeys`.

    - #### setKeySetId

          public DownloadRequest.Builder setKeySetId​(@Nullable
                                                     byte[] keySetId)

      Sets the `DownloadRequest.keySetId`.

    - #### setCustomCacheKey

          public DownloadRequest.Builder setCustomCacheKey​(@Nullable
                                                           String customCacheKey)

      Sets the `DownloadRequest.customCacheKey`.

    - #### setData

          public DownloadRequest.Builder setData​(@Nullable
                                                 byte[] data)

      Sets the `DownloadRequest.data`.

    - #### build

          public DownloadRequest build()