ByteArrayModelSource

A ModelByteSource over an in-memory byte array (for example a header prefix or a test fixture).

Constructors

Link copied to clipboard
constructor(bytes: ByteArray)

Properties

Link copied to clipboard
open override val size: Long

Total size in bytes, or -1 if unknown (a stream whose end is only found by reading).

Functions

Link copied to clipboard
open override fun close()

Does nothing: the source holds no resources.

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

Reads up to length bytes starting at file offset position into buffer at offset.