set

context(env: JniEnv)
operator fun JObjectArray.set(index: Int, value: JObject?)(source)

Sets an element of an Object array. The index must be within the range of the array.

Throws

if index does not specify a valid index in the array.

ArrayStoreException

if the class of value is not a subclass of the element class of the array.


context(env: JniEnv)
inline fun JByteArray.set(source: ByteArray, offset: Int = 0, startIndex: Int = 0, endIndex: Int = source.size)(source)

Writes a region of the Kotlin source array into this JVM byte[] starting at offset using setRegion.

Parameters

source

the source Kotlin array.

offset

the starting index in this JVM array.

startIndex

the first index of source to copy.

endIndex

the last (exclusive) index of source to copy.

Throws

if either region is out of bounds.