@UnstableApi
class DownloadBuilder


Builder for Download.

Defines default values for each field (except id) to facilitate Download creation for tests. Tests must avoid depending on the default values but explicitly set tested parameters during test initialization.

Summary

Public constructors

Creates a download builder for "uri" and no stream keys.

Creates a download builder based on the attributes of the specified request.

Public constructors

DownloadBuilder

DownloadBuilder(id: String!)

Creates a download builder for "uri" and no stream keys.

Parameters
id: String!

The unique content identifier for the download.

DownloadBuilder

DownloadBuilder(request: DownloadRequest!)

Creates a download builder based on the attributes of the specified request.

Parameters
request: DownloadRequest!

A DownloadRequest defining the content to download.

Public functions

build

fun build(): Download!

setBytesDownloaded

@CanIgnoreReturnValue
fun setBytesDownloaded(bytesDownloaded: Long): DownloadBuilder!
See also
bytesDownloaded

setCacheKey

@CanIgnoreReturnValue
fun setCacheKey(cacheKey: String?): DownloadBuilder!
See also
customCacheKey

setContentLength

@CanIgnoreReturnValue
fun setContentLength(contentLength: Long): DownloadBuilder!
See also
contentLength

setCustomMetadata

@CanIgnoreReturnValue
fun setCustomMetadata(customMetadata: ByteArray!): DownloadBuilder!
See also
data

setFailureReason

@CanIgnoreReturnValue
fun setFailureReason(failureReason: Int): DownloadBuilder!
See also
failureReason

setKeySetId

@CanIgnoreReturnValue
fun setKeySetId(keySetId: ByteArray!): DownloadBuilder!
See also
keySetId

setMimeType

@CanIgnoreReturnValue
fun setMimeType(mimeType: String!): DownloadBuilder!
See also
mimeType

setPercentDownloaded

@CanIgnoreReturnValue
fun setPercentDownloaded(percentDownloaded: Float): DownloadBuilder!

setStartTimeMs

@CanIgnoreReturnValue
fun setStartTimeMs(startTimeMs: Long): DownloadBuilder!
See also
startTimeMs

setStopReason

@CanIgnoreReturnValue
fun setStopReason(stopReason: Int): DownloadBuilder!
See also
stopReason

setStreamKeys

@CanIgnoreReturnValue
fun setStreamKeys(streamKeys: Array<StreamKey!>!): DownloadBuilder!
See also
streamKeys

setUpdateTimeMs

@CanIgnoreReturnValue
fun setUpdateTimeMs(updateTimeMs: Long): DownloadBuilder!
See also
updateTimeMs

setUri

@CanIgnoreReturnValue
fun setUri(uri: String!): DownloadBuilder!
See also
uri

setUri

@CanIgnoreReturnValue
fun setUri(uri: Uri!): DownloadBuilder!
See also
uri