StreamDownloadTask.TaskSnapshot

public class StreamDownloadTask.TaskSnapshot extends StorageTask.SnapshotBase


Encapsulates state about the running StreamDownloadTask

Summary

Extension functions

final long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.

final long

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

final long

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

final long

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

final @NonNull InputStream

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

final @NonNull InputStream

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

Inherited methods

From com.google.firebase.storage.StorageTask.SnapshotBase
@Nullable Exception

Returns the last error encountered.

@NonNull StorageReference

Returns the target of the upload.

@NonNull StorageTask<ResultT>

Returns the StorageTask for this state.

Public methods

getBytesTransferred

public long getBytesTransferred()
Returns
long

the total bytes downloaded so far.

getStream

public @NonNull InputStream getStream()
Returns
@NonNull InputStream

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

getTotalByteCount

public long getTotalByteCount()
Returns
long

the total bytes of the download.

Extension functions

StorageKt.component1

public final long StorageKt.component1(@NonNull StreamDownloadTask.TaskSnapshot receiver)

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide bytesTransferred.

Returns
long

the bytesTransferred of the StreamDownloadTask.TaskSnapshot

StorageKt.component1

public final long StorageKt.component1(@NonNull StreamDownloadTask.TaskSnapshot receiver)

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

StorageKt.component2

public final long StorageKt.component2(@NonNull StreamDownloadTask.TaskSnapshot receiver)

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

Returns
long

the totalByteCount of the StreamDownloadTask.TaskSnapshot

StorageKt.component2

public final long StorageKt.component2(@NonNull StreamDownloadTask.TaskSnapshot receiver)

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

StorageKt.component3

public final @NonNull InputStream StorageKt.component3(@NonNull StreamDownloadTask.TaskSnapshot receiver)

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

StorageKt.component3

public final @NonNull InputStream StorageKt.component3(@NonNull StreamDownloadTask.TaskSnapshot receiver)

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.