StreamDownloadTask.TaskSnapshot

class StreamDownloadTask.TaskSnapshot : StorageTask.SnapshotBase


Encapsulates state about the running StreamDownloadTask

Summary

Extension functions

operator Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

operator Long

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

operator InputStream

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

operator InputStream

This function is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Inherited functions

From com.google.firebase.storage.StorageTask.SnapshotBase
Exception?

Returns the last error encountered.

StorageReference

Returns the target of the upload.

StorageTask<ResultT!>

Returns the StorageTask for this state.

Public functions

getBytesTransferred

fun getBytesTransferred(): Long
Returns
Long

the total bytes downloaded so far.

getStream

fun getStream(): InputStream
Returns
InputStream

The stream that represents downloaded bytes from Storage. This stream should be closed either in doInBackground or in OnSuccessListener, OnFailureListener

getTotalByteCount

fun getTotalByteCount(): Long
Returns
Long

the total bytes of the download.

Extension functions

component1

operator fun StreamDownloadTask.TaskSnapshot.component1(): Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.

Returns
Long

the bytesTransferred of the StreamDownloadTask.TaskSnapshot

component1

operator fun StreamDownloadTask.TaskSnapshot.component1(): Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-storage-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

Returns
Long

the bytesTransferred of the StreamDownloadTask.TaskSnapshot

component2

operator fun StreamDownloadTask.TaskSnapshot.component2(): Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

Returns
Long

the totalByteCount of the StreamDownloadTask.TaskSnapshot

component2

operator fun StreamDownloadTask.TaskSnapshot.component2(): Long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-storage-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

Returns
Long

the totalByteCount of the StreamDownloadTask.TaskSnapshot

component3

operator fun StreamDownloadTask.TaskSnapshot.component3(): InputStream

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

Returns
InputStream

the stream of the StreamDownloadTask.TaskSnapshot

component3

operator fun StreamDownloadTask.TaskSnapshot.component3(): InputStream

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-storage-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

Returns
InputStream

the stream of the StreamDownloadTask.TaskSnapshot