buffered

fun Resource.buffered(resourceLength: Long? = null, bufferSize: Int = DEFAULT_BUFFER_SIZE): BufferingResource

Wraps this resource in a BufferingResource to improve reading performances.

Parameters

resourceLength

The total length of the resource, when known. This can improve performance by avoiding requesting the length from the underlying resource.

bufferSize

Size of the buffer chunks to read.