StreamDownloadTask.StreamProcessor

interface StreamDownloadTask.StreamProcessor


A callback that is used to handle the stream download

Summary

Public functions

Unit

doInBackground gets called on a background thread and should process the input stream to load data as desired.

Public functions

doInBackground

fun doInBackground(
    state: StreamDownloadTask.TaskSnapshot,
    stream: InputStream
): Unit

doInBackground gets called on a background thread and should process the input stream to load data as desired. The stream should be closed prior to returning or in the handler onSuccess

Parameters
state: StreamDownloadTask.TaskSnapshot

is the current TaskSnapshot for this task

stream: InputStream

the InputStream for the downloaded bytes.

Throws
java.io.IOException: java.io.IOException

may be thrown to cancel the operation.