DownloadRequest.Builder
public class DownloadRequest.Builder
A builder for download requests.
Summary
Public constructors |
|---|
|
Creates a new instance with the specified id and uri. |
Public methods |
|
|---|---|
DownloadRequest |
build() |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the byte range to be downloaded. |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the |
DownloadRequest.Builder |
@CanIgnoreReturnValueSets the time range to be downloaded. |
Public constructors
Public methods
setByteRange
@CanIgnoreReturnValue
public DownloadRequest.Builder setByteRange(long offset, long length)
Sets the byte range to be downloaded.
This will be ignored for DASH, HLS and SmoothStreaming downloads.
| Parameters | |
|---|---|
long offset |
The offset that the download should start from. |
long length |
The length from the |
setCustomCacheKey
@CanIgnoreReturnValue
public DownloadRequest.Builder setCustomCacheKey(@Nullable String customCacheKey)
Sets the customCacheKey.
setData
@CanIgnoreReturnValue
public DownloadRequest.Builder setData(@Nullable byte[] data)
Sets the data.
setKeySetId
@CanIgnoreReturnValue
public DownloadRequest.Builder setKeySetId(@Nullable byte[] keySetId)
Sets the keySetId.
setMimeType
@CanIgnoreReturnValue
public DownloadRequest.Builder setMimeType(@Nullable String mimeType)
Sets the mimeType.
setStreamKeys
@CanIgnoreReturnValue
public DownloadRequest.Builder setStreamKeys(@Nullable List<StreamKey> streamKeys)
Sets the streamKeys.
setTimeRange
@CanIgnoreReturnValue
public DownloadRequest.Builder setTimeRange(long startPositionUs, long durationUs)
Sets the time range to be downloaded.
This will be ignored progressive downloads.
| Parameters | |
|---|---|
long startPositionUs |
The start position in microseconds that the download should start from. |
long durationUs |
The duration in microseconds from the |