RawByteSource

A ByteSource that wraps a simple ByteArray buffer.

Constructors

Link copied to clipboard
constructor(bytes: ByteArray)

Properties

Link copied to clipboard
open override val length: Long

The length of this byte source, if fixed and known, or null otherwise.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend override fun read(buffer: ByteArray, offset: Int, length: Int): Int

Transfer up to length bytes, writing them into the target buffer array at the specified offset.

Link copied to clipboard
suspend fun ByteSource.readRemaining(limit: Int? = null): ByteArray

Read all remaining bytes out of the receiving ByteSource.

Link copied to clipboard

Convert this byte source into an InputStream.