Package-level declarations

Types

Link copied to clipboard
sealed class ColibrioResult<out T>

Represents result of an operation. Can be either ColibrioResult.Success holding data of type T, or ColibrioResult.Error holding exception of type ColibrioException.

Link copied to clipboard

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

Link copied to clipboard

You use a ResourceProvider to fetch resources from a "resource container". A resource container can for example be:

Link copied to clipboard
class ResourceRequestOptions(val accept: List<String>? = null, val range: ByteRangeRequest? = null)
Link copied to clipboard

Describes a response from ResourceProvider.fetch. It contains metadata about the resource and methods for reading the resource body.

Link copied to clipboard

The ZipResourceProvider is used for fetching resources from a ZIP archive. It reads ZIP archive data from a RandomAccessDataSource.

Link copied to clipboard

Functions

Link copied to clipboard
fun <T> CoroutineScope.convertToCallbacks(block: suspend () -> ColibrioResult<T>, onSuccess: () -> Unit, onError: (ColibrioException) -> Unit)
fun <T> CoroutineScope.convertToCallbacks(block: suspend () -> ColibrioResult<T>, onSuccess: (T) -> Unit, onError: (ColibrioException) -> Unit)
Link copied to clipboard
fun RandomAccessDataSource.fetchChunkAsync(startOffset: Long, endOffset: Long): Deferred<ByteArray>