DownloadBuilder
@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 |
|---|
DownloadBuilder(id: String!)Creates a download builder for "uri" and no stream keys. |
DownloadBuilder(request: DownloadRequest!)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 |
Public functions
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!
| See also | |
|---|---|
percentDownloaded |
setStartTimeMs
@CanIgnoreReturnValue
fun setStartTimeMs(startTimeMs: Long): DownloadBuilder!
| See also | |
|---|---|
startTimeMs |
setState
@CanIgnoreReturnValue
fun setState(@Download.State state: Int): DownloadBuilder!
| See also | |
|---|---|
state |
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 |