provide

abstract suspend fun provide(position: Long, length: Long): <Error class: unknown class><InputStream, Long>

Provides an InputStream from a given position.

Return

An InputStream from the given position and the total bytes that can be read, or -1 if unknown.

Parameters

position

The position to start reading from, 0 if the stream should start from the beginning

length

The total bytes that should be the end of the stream, -1 if unknown. Important for seeking.