RandomAccessDataSource

A RandomAccessDataSource is used for reading chunks of bytes from file.

Properties

Link copied to clipboard
abstract val size: Long

Get the size of the resource in number of bytes.

Functions

Link copied to clipboard
abstract fun fetchChunk(startOffset: Long, endOffset: Long): ByteArray

Synchronously fetch a chunk of data from a start and end byte offset. This method should be thread safe as it can be called from multiple threads simultaneously. In case of error, throw exception.