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

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide totalByteCount.

final @NonNull InputStream

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.

Inherited methods

@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.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.component3

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

Destructuring declaration for StreamDownloadTask.TaskSnapshot to provide its stream.