//leakcanary/shark/ThrowingCancelableFileSourceProvider
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 | fun ThrowingCancelableFileSourceProvider(file: File, throwIfCanceled: Runnable) |
Functions¶
Name | Summary |
---|---|
openRandomAccessSource | open override fun openRandomAccessSource(): RandomAccessSource |
openStreamingSource | open override fun openStreamingSource(): BufferedSource |