ThrowingCancelableFileSourceProvider

class ThrowingCancelableFileSourceProvider(file: File, throwIfCanceled: Runnable) : DualSourceProvider

A DualSourceProvider that invokes throwIfCanceled before every read, allowing cancellation of IO based work built on top by throwing an exception.

Constructors

ThrowingCancelableFileSourceProvider
Link copied to clipboard
fun ThrowingCancelableFileSourceProvider(file: File, throwIfCanceled: Runnable)

Functions

openRandomAccessSource
Link copied to clipboard
open override fun openRandomAccessSource(): RandomAccessSource
openStreamingSource
Link copied to clipboard
open override fun openStreamingSource(): BufferedSource