Aller au contenu

ArrayBuffer

=== "common"
expect sealed interface ArrayBuffer
    
Represents a buffer of raw binary data, which can be used in various WebGPU operations. Provides a mechanism to work directly with raw memory for performance-critical computations or data manipulation when working with GPU resources. This class is an abstraction for handling binary data in a format compatible with WebGPU, allowing interoperability with GPU resources like buffers and textures. ## Sizes and capacities Public sizes stay [`ULong`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-u-long/index.html). For this increment each implementation caps its logical capacity at [`Int.MAX_VALUE`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/-companion/-m-a-x_-v-a-l-u-e.html) bytes on Web, Android and Native, and [`Long.MAX_VALUE`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/-companion/-m-a-x_-v-a-l-u-e.html) bytes on the JVM. These limits describe the current representations, not the platforms' theoretical capacities, and do not promise that an allocation succeeds. An allocation or wrapping size that is not representable is rejected with [`IllegalArgumentException`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html); a real allocation failure surfaces as the platform error. ## Validation order An access validates its range, then the alignment of a non-empty operation, then the numeric conversion, and only then touches memory. An out-of-range access throws [`IndexOutOfBoundsException`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html); an unaligned offset, a size not divisible by the element width, or an element count too large for a Kotlin array throws [`IllegalArgumentException`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html). Size multiplications are computed in a wide type after a `count <= maximum / width` check. A zero-length operation at `offset == size` is valid and one past it fails. Empty operations never dereference a pointer and never create a typed view that would require alignment, so `allocate(0uL)` and `of(emptyArray)` work on every target. A write rejected by these preconditions leaves the whole memory unchanged; this is not a transactional guarantee against concurrent external changes. The checks only cover the declared range: an external pointer must still designate a real, large enough and live memory region. === "android"
actual interface ArrayBuffer
    
Represents a platform-specific abstraction for handling raw binary data buffers. `ArrayBuffer` is a sealed interface that provides a common type for working with binary data across multiple platforms. It is typically associated with use cases such as data transfer, WebGPU operations, or interfacing with native libraries. This interface is intended to be implemented by platform-specific classes or value types that wrap the underlying buffer implementation, such as direct `ByteBuffer` on Android. Example usage:
val buffer = ArrayBuffer.from(byteArrayOf(1, 2, 3, 4))
val intBuffer = ArrayBuffer.from(intArrayOf(100, 200, 300))
=== "jvm"
actual interface ArrayBuffer
    
Represents a platform-specific abstraction for handling raw binary data buffers. `ArrayBuffer` is a sealed interface that provides a common type for working with binary data across multiple platforms. It is typically associated with use cases such as data transfer, WebGPU operations, or interfacing with native libraries. This interface is intended to be implemented by platform-specific classes or value types that wrap the underlying buffer implementation, such as `ByteBuffer` on JVM or `org.khronos.webgl.ArrayBuffer` on JavaScript or Wasm. === "native"
actual interface ArrayBuffer
    
Represents a platform-specific abstraction over raw binary data stored in an ArrayBuffer. This interface provides a unified way to interact with binary data across platforms, allowing efficient manipulation and processing of raw buffers. It is primarily used in contexts where native interop or web functionalities like WebGPU and WebGL require a representation of binary buffers. Implementations of this interface may vary depending on the target platform, such as browser environments or native environments. They typically map to platform-native concepts like `org.khronos.webgl.ArrayBuffer` in JavaScript or analogous native structures in other environments. Intended for use with platform-specific operations where binary data transfer or manipulation is necessary. === "web"
actual interface ArrayBuffer
    
A platform-independent representation of a fixed-length raw binary data buffer. The `ArrayBuffer` interface provides the ability to efficiently handle and store binary data in memory, often as the underlying storage for typed arrays. It is immutable, meaning its size cannot be adjusted once created. This abstraction is commonly used for processing low-level binary data, enabling tasks such as file handling, network communication, or interfacing with Web APIs that require binary data storage. === "jvm, android, web, native" #### Inheritors - [`AndroidArrayBuffer`](../-android-array-buffer/index.md) - [`JvmArrayBuffer`](../-jvm-array-buffer/index.md) - [`OpaquePointerArrayBuffer`](../-opaque-pointer-array-buffer/index.md) - [`WebArrayBuffer`](../-web-array-buffer/index.md)

Types

Companion

expect object Companion
actual object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

size

=== "common"
expect abstract val size: ULong
    
=== "android"
actual abstract val size: ULong
    
=== "jvm"
actual abstract val size: ULong
    
=== "native"
actual abstract val size: ULong
    
=== "web"
actual abstract val size: ULong
    
=== "common" The size of the buffer in bytes. === "android" The size of the buffer in bytes. === "jvm" The size of the buffer in bytes. === "native" The size of the buffer in bytes. === "web" The size of the buffer in bytes.

Functions

getByte

=== "common"
expect abstract fun getByte(offset: ULong): Byte
    
=== "android"
actual abstract fun getByte(offset: ULong): Byte
    
=== "jvm"
actual abstract fun getByte(offset: ULong): Byte
    
=== "native"
actual abstract fun getByte(offset: ULong): Byte
    
=== "web"
actual abstract fun getByte(offset: ULong): Byte
    
=== "common" Reads a byte at the specified offset. **Return** the byte value === "android" Reads a byte at the specified offset. **Return** the byte value === "jvm" Reads a byte at the specified offset. **Return** the byte value === "native" Reads a byte at the specified offset. **Return** the byte value === "web" Reads a byte at the specified offset. **Return** the byte value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset - offset: the byte offset - offset: the byte offset - offset: the byte offset - offset: the byte offset

getDouble

=== "common"
expect abstract fun getDouble(offset: ULong): Double
    
=== "android"
actual abstract fun getDouble(offset: ULong): Double
    
=== "jvm"
actual abstract fun getDouble(offset: ULong): Double
    
=== "native"
actual abstract fun getDouble(offset: ULong): Double
    
=== "web"
actual abstract fun getDouble(offset: ULong): Double
    
=== "common" Reads a double at the specified offset. **Return** the double value === "android" Reads a double at the specified offset. **Return** the double value === "jvm" Reads a double at the specified offset. **Return** the double value === "native" Reads a double at the specified offset. **Return** the double value === "web" Reads a double at the specified offset. **Return** the double value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 8 bytes) - offset: the byte offset (must be aligned to 8 bytes) - offset: the byte offset (must be aligned to 8 bytes) - offset: the byte offset (must be aligned to 8 bytes) - offset: the byte offset (must be aligned to 8 bytes)

getFloat

=== "common"
expect abstract fun getFloat(offset: ULong): Float
    
=== "android"
actual abstract fun getFloat(offset: ULong): Float
    
=== "jvm"
actual abstract fun getFloat(offset: ULong): Float
    
=== "native"
actual abstract fun getFloat(offset: ULong): Float
    
=== "web"
actual abstract fun getFloat(offset: ULong): Float
    
=== "common" Reads a float at the specified offset. **Return** the float value === "android" Reads a float at the specified offset. **Return** the float value === "jvm" Reads a float at the specified offset. **Return** the float value === "native" Reads a float at the specified offset. **Return** the float value === "web" Reads a float at the specified offset. **Return** the float value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes)

getInt

=== "common"
expect abstract fun getInt(offset: ULong): Int
    
=== "android"
actual abstract fun getInt(offset: ULong): Int
    
=== "jvm"
actual abstract fun getInt(offset: ULong): Int
    
=== "native"
actual abstract fun getInt(offset: ULong): Int
    
=== "web"
actual abstract fun getInt(offset: ULong): Int
    
=== "common" Reads an int at the specified offset. **Return** the int value === "android" Reads an int at the specified offset. **Return** the int value === "jvm" Reads an int at the specified offset. **Return** the int value === "native" Reads an int at the specified offset. **Return** the int value === "web" Reads an int at the specified offset. **Return** the int value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes)

getShort

=== "common"
expect abstract fun getShort(offset: ULong): Short
    
=== "android"
actual abstract fun getShort(offset: ULong): Short
    
=== "jvm"
actual abstract fun getShort(offset: ULong): Short
    
=== "native"
actual abstract fun getShort(offset: ULong): Short
    
=== "web"
actual abstract fun getShort(offset: ULong): Short
    
=== "common" Reads a short at the specified offset. **Return** the short value === "android" Reads a short at the specified offset. **Return** the short value === "jvm" Reads a short at the specified offset. **Return** the short value === "native" Reads a short at the specified offset. **Return** the short value === "web" Reads a short at the specified offset. **Return** the short value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes)

getUByte

=== "common"
expect abstract fun getUByte(offset: ULong): UByte
    
=== "android"
actual abstract fun getUByte(offset: ULong): UByte
    
=== "jvm"
actual abstract fun getUByte(offset: ULong): UByte
    
=== "native"
actual abstract fun getUByte(offset: ULong): UByte
    
=== "web"
actual abstract fun getUByte(offset: ULong): UByte
    
=== "common" Reads an unsigned byte at the specified offset. **Return** the unsigned byte value === "android" Reads an unsigned byte at the specified offset. **Return** the unsigned byte value === "jvm" Reads an unsigned byte at the specified offset. **Return** the unsigned byte value === "native" Reads an unsigned byte at the specified offset. **Return** the unsigned byte value === "web" Reads an unsigned byte at the specified offset. **Return** the unsigned byte value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset - offset: the byte offset - offset: the byte offset - offset: the byte offset - offset: the byte offset

getUInt

=== "common"
expect abstract fun getUInt(offset: ULong): UInt
    
=== "android"
actual abstract fun getUInt(offset: ULong): UInt
    
=== "jvm"
actual abstract fun getUInt(offset: ULong): UInt
    
=== "native"
actual abstract fun getUInt(offset: ULong): UInt
    
=== "web"
actual abstract fun getUInt(offset: ULong): UInt
    
=== "common" Reads an unsigned int at the specified offset. **Return** the unsigned int value === "android" Reads an unsigned int at the specified offset. **Return** the unsigned int value === "jvm" Reads an unsigned int at the specified offset. **Return** the unsigned int value === "native" Reads an unsigned int at the specified offset. **Return** the unsigned int value === "web" Reads an unsigned int at the specified offset. **Return** the unsigned int value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes) - offset: the byte offset (must be aligned to 4 bytes)

getUShort

=== "common"
expect abstract fun getUShort(offset: ULong): UShort
    
=== "android"
actual abstract fun getUShort(offset: ULong): UShort
    
=== "jvm"
actual abstract fun getUShort(offset: ULong): UShort
    
=== "native"
actual abstract fun getUShort(offset: ULong): UShort
    
=== "web"
actual abstract fun getUShort(offset: ULong): UShort
    
=== "common" Reads an unsigned short at the specified offset. **Return** the unsigned short value === "android" Reads an unsigned short at the specified offset. **Return** the unsigned short value === "jvm" Reads an unsigned short at the specified offset. **Return** the unsigned short value === "native" Reads an unsigned short at the specified offset. **Return** the unsigned short value === "web" Reads an unsigned short at the specified offset. **Return** the unsigned short value === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes) - offset: the byte offset (must be aligned to 2 bytes)

setByte

=== "common"
expect abstract fun setByte(offset: ULong, value: Byte)
    
=== "android"
actual abstract fun setByte(offset: ULong, value: Byte)
    
=== "jvm"
actual abstract fun setByte(offset: ULong, value: Byte)
    
=== "native"
actual abstract fun setByte(offset: ULong, value: Byte)
    
=== "web"
actual abstract fun setByte(offset: ULong, value: Byte)
    
=== "common" Writes a byte at the specified offset. === "android" Writes a byte at the specified offset. === "jvm" Writes a byte at the specified offset. === "native" Writes a byte at the specified offset. === "web" Writes a byte at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset - value: the byte value to write - offset: the byte offset - value: the byte value to write - offset: the byte offset - value: the byte value to write - offset: the byte offset - value: the byte value to write - offset: the byte offset - value: the byte value to write

setBytes

=== "common"
expect abstract fun setBytes(offset: ULong, array: ByteArray)
    
=== "android"
actual abstract fun setBytes(offset: ULong, array: ByteArray)
    
=== "jvm"
actual abstract fun setBytes(offset: ULong, array: ByteArray)
    
=== "native"
actual abstract fun setBytes(offset: ULong, array: ByteArray)
    
=== "web"
actual abstract fun setBytes(offset: ULong, array: ByteArray)
    
=== "common" Writes a ByteArray into the buffer at the specified offset. === "android" Writes a ByteArray into the buffer at the specified offset. === "jvm" Writes a ByteArray into the buffer at the specified offset. === "native" Writes a ByteArray into the buffer at the specified offset. === "web" Writes a ByteArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing - array: the byte array to write - offset: the byte offset where to start writing - array: the byte array to write - offset: the byte offset where to start writing - array: the byte array to write - offset: the byte offset where to start writing - array: the byte array to write - offset: the byte offset where to start writing - array: the byte array to write

setDouble

=== "common"
expect abstract fun setDouble(offset: ULong, value: Double)
    
=== "android"
actual abstract fun setDouble(offset: ULong, value: Double)
    
=== "jvm"
actual abstract fun setDouble(offset: ULong, value: Double)
    
=== "native"
actual abstract fun setDouble(offset: ULong, value: Double)
    
=== "web"
actual abstract fun setDouble(offset: ULong, value: Double)
    
=== "common" Writes a double at the specified offset. === "android" Writes a double at the specified offset. === "jvm" Writes a double at the specified offset. === "native" Writes a double at the specified offset. === "web" Writes a double at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 8 bytes) - value: the double value to write - offset: the byte offset (must be aligned to 8 bytes) - value: the double value to write - offset: the byte offset (must be aligned to 8 bytes) - value: the double value to write - offset: the byte offset (must be aligned to 8 bytes) - value: the double value to write - offset: the byte offset (must be aligned to 8 bytes) - value: the double value to write

setDoubles

=== "common"
expect abstract fun setDoubles(offset: ULong, array: DoubleArray)
    
=== "android"
actual abstract fun setDoubles(offset: ULong, array: DoubleArray)
    
=== "jvm"
actual abstract fun setDoubles(offset: ULong, array: DoubleArray)
    
=== "native"
actual abstract fun setDoubles(offset: ULong, array: DoubleArray)
    
=== "web"
actual abstract fun setDoubles(offset: ULong, array: DoubleArray)
    
=== "common" Writes a DoubleArray into the buffer at the specified offset. === "android" Writes a DoubleArray into the buffer at the specified offset. === "jvm" Writes a DoubleArray into the buffer at the specified offset. === "native" Writes a DoubleArray into the buffer at the specified offset. === "web" Writes a DoubleArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing (must be aligned to 8 bytes) - array: the double array to write - offset: the byte offset where to start writing (must be aligned to 8 bytes) - array: the double array to write - offset: the byte offset where to start writing (must be aligned to 8 bytes) - array: the double array to write - offset: the byte offset where to start writing (must be aligned to 8 bytes) - array: the double array to write - offset: the byte offset where to start writing (must be aligned to 8 bytes) - array: the double array to write

setFloat

=== "common"
expect abstract fun setFloat(offset: ULong, value: Float)
    
=== "android"
actual abstract fun setFloat(offset: ULong, value: Float)
    
=== "jvm"
actual abstract fun setFloat(offset: ULong, value: Float)
    
=== "native"
actual abstract fun setFloat(offset: ULong, value: Float)
    
=== "web"
actual abstract fun setFloat(offset: ULong, value: Float)
    
=== "common" Writes a float at the specified offset. === "android" Writes a float at the specified offset. === "jvm" Writes a float at the specified offset. === "native" Writes a float at the specified offset. === "web" Writes a float at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 4 bytes) - value: the float value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the float value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the float value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the float value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the float value to write

setFloats

=== "common"
expect abstract fun setFloats(offset: ULong, array: FloatArray)
    
=== "android"
actual abstract fun setFloats(offset: ULong, array: FloatArray)
    
=== "jvm"
actual abstract fun setFloats(offset: ULong, array: FloatArray)
    
=== "native"
actual abstract fun setFloats(offset: ULong, array: FloatArray)
    
=== "web"
actual abstract fun setFloats(offset: ULong, array: FloatArray)
    
=== "common" Writes a FloatArray into the buffer at the specified offset. === "android" Writes a FloatArray into the buffer at the specified offset. === "jvm" Writes a FloatArray into the buffer at the specified offset. === "native" Writes a FloatArray into the buffer at the specified offset. === "web" Writes a FloatArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the float array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the float array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the float array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the float array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the float array to write

setInt

=== "common"
expect abstract fun setInt(offset: ULong, value: Int)
    
=== "android"
actual abstract fun setInt(offset: ULong, value: Int)
    
=== "jvm"
actual abstract fun setInt(offset: ULong, value: Int)
    
=== "native"
actual abstract fun setInt(offset: ULong, value: Int)
    
=== "web"
actual abstract fun setInt(offset: ULong, value: Int)
    
=== "common" Writes an int at the specified offset. === "android" Writes an int at the specified offset. === "jvm" Writes an int at the specified offset. === "native" Writes an int at the specified offset. === "web" Writes an int at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 4 bytes) - value: the int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the int value to write

setInts

=== "common"
expect abstract fun setInts(offset: ULong, array: IntArray)
    
=== "android"
actual abstract fun setInts(offset: ULong, array: IntArray)
    
=== "jvm"
actual abstract fun setInts(offset: ULong, array: IntArray)
    
=== "native"
actual abstract fun setInts(offset: ULong, array: IntArray)
    
=== "web"
actual abstract fun setInts(offset: ULong, array: IntArray)
    
=== "common" Writes an IntArray into the buffer at the specified offset. === "android" Writes an IntArray into the buffer at the specified offset. === "jvm" Writes an IntArray into the buffer at the specified offset. === "native" Writes an IntArray into the buffer at the specified offset. === "web" Writes an IntArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the int array to write

setShort

=== "common"
expect abstract fun setShort(offset: ULong, value: Short)
    
=== "android"
actual abstract fun setShort(offset: ULong, value: Short)
    
=== "jvm"
actual abstract fun setShort(offset: ULong, value: Short)
    
=== "native"
actual abstract fun setShort(offset: ULong, value: Short)
    
=== "web"
actual abstract fun setShort(offset: ULong, value: Short)
    
=== "common" Writes a short at the specified offset. === "android" Writes a short at the specified offset. === "jvm" Writes a short at the specified offset. === "native" Writes a short at the specified offset. === "web" Writes a short at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 2 bytes) - value: the short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the short value to write

setShorts

=== "common"
expect abstract fun setShorts(offset: ULong, array: ShortArray)
    
=== "android"
actual abstract fun setShorts(offset: ULong, array: ShortArray)
    
=== "jvm"
actual abstract fun setShorts(offset: ULong, array: ShortArray)
    
=== "native"
actual abstract fun setShorts(offset: ULong, array: ShortArray)
    
=== "web"
actual abstract fun setShorts(offset: ULong, array: ShortArray)
    
=== "common" Writes a ShortArray into the buffer at the specified offset. === "android" Writes a ShortArray into the buffer at the specified offset. === "jvm" Writes a ShortArray into the buffer at the specified offset. === "native" Writes a ShortArray into the buffer at the specified offset. === "web" Writes a ShortArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the short array to write

setUByte

=== "common"
expect abstract fun setUByte(offset: ULong, value: UByte)
    
=== "android"
actual abstract fun setUByte(offset: ULong, value: UByte)
    
=== "jvm"
actual abstract fun setUByte(offset: ULong, value: UByte)
    
=== "native"
actual abstract fun setUByte(offset: ULong, value: UByte)
    
=== "web"
actual abstract fun setUByte(offset: ULong, value: UByte)
    
=== "common" Writes an unsigned byte at the specified offset. === "android" Writes an unsigned byte at the specified offset. === "jvm" Writes an unsigned byte at the specified offset. === "native" Writes an unsigned byte at the specified offset. === "web" Writes an unsigned byte at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset - value: the unsigned byte value to write - offset: the byte offset - value: the unsigned byte value to write - offset: the byte offset - value: the unsigned byte value to write - offset: the byte offset - value: the unsigned byte value to write - offset: the byte offset - value: the unsigned byte value to write

setUBytes

=== "common"
expect abstract fun setUBytes(offset: ULong, array: UByteArray)
    
=== "android"
actual abstract fun setUBytes(offset: ULong, array: UByteArray)
    
=== "jvm"
actual abstract fun setUBytes(offset: ULong, array: UByteArray)
    
=== "native"
actual abstract fun setUBytes(offset: ULong, array: UByteArray)
    
=== "web"
actual abstract fun setUBytes(offset: ULong, array: UByteArray)
    
=== "common" Writes a UByteArray into the buffer at the specified offset. === "android" Writes a UByteArray into the buffer at the specified offset. === "jvm" Writes a UByteArray into the buffer at the specified offset. === "native" Writes a UByteArray into the buffer at the specified offset. === "web" Writes a UByteArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing - array: the unsigned byte array to write - offset: the byte offset where to start writing - array: the unsigned byte array to write - offset: the byte offset where to start writing - array: the unsigned byte array to write - offset: the byte offset where to start writing - array: the unsigned byte array to write - offset: the byte offset where to start writing - array: the unsigned byte array to write

setUInt

=== "common"
expect abstract fun setUInt(offset: ULong, value: UInt)
    
=== "android"
actual abstract fun setUInt(offset: ULong, value: UInt)
    
=== "jvm"
actual abstract fun setUInt(offset: ULong, value: UInt)
    
=== "native"
actual abstract fun setUInt(offset: ULong, value: UInt)
    
=== "web"
actual abstract fun setUInt(offset: ULong, value: UInt)
    
=== "common" Writes an unsigned int at the specified offset. === "android" Writes an unsigned int at the specified offset. === "jvm" Writes an unsigned int at the specified offset. === "native" Writes an unsigned int at the specified offset. === "web" Writes an unsigned int at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 4 bytes) - value: the unsigned int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the unsigned int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the unsigned int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the unsigned int value to write - offset: the byte offset (must be aligned to 4 bytes) - value: the unsigned int value to write

setUInts

=== "common"
expect abstract fun setUInts(offset: ULong, array: UIntArray)
    
=== "android"
actual abstract fun setUInts(offset: ULong, array: UIntArray)
    
=== "jvm"
actual abstract fun setUInts(offset: ULong, array: UIntArray)
    
=== "native"
actual abstract fun setUInts(offset: ULong, array: UIntArray)
    
=== "web"
actual abstract fun setUInts(offset: ULong, array: UIntArray)
    
=== "common" Writes a UIntArray into the buffer at the specified offset. === "android" Writes a UIntArray into the buffer at the specified offset. === "jvm" Writes a UIntArray into the buffer at the specified offset. === "native" Writes a UIntArray into the buffer at the specified offset. === "web" Writes a UIntArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the unsigned int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the unsigned int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the unsigned int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the unsigned int array to write - offset: the byte offset where to start writing (must be aligned to 4 bytes) - array: the unsigned int array to write

setUShort

=== "common"
expect abstract fun setUShort(offset: ULong, value: UShort)
    
=== "android"
actual abstract fun setUShort(offset: ULong, value: UShort)
    
=== "jvm"
actual abstract fun setUShort(offset: ULong, value: UShort)
    
=== "native"
actual abstract fun setUShort(offset: ULong, value: UShort)
    
=== "web"
actual abstract fun setUShort(offset: ULong, value: UShort)
    
=== "common" Writes an unsigned short at the specified offset. === "android" Writes an unsigned short at the specified offset. === "jvm" Writes an unsigned short at the specified offset. === "native" Writes an unsigned short at the specified offset. === "web" Writes an unsigned short at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset (must be aligned to 2 bytes) - value: the unsigned short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the unsigned short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the unsigned short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the unsigned short value to write - offset: the byte offset (must be aligned to 2 bytes) - value: the unsigned short value to write

setUShorts

=== "common"
expect abstract fun setUShorts(offset: ULong, array: UShortArray)
    
=== "android"
actual abstract fun setUShorts(offset: ULong, array: UShortArray)
    
=== "jvm"
actual abstract fun setUShorts(offset: ULong, array: UShortArray)
    
=== "native"
actual abstract fun setUShorts(offset: ULong, array: UShortArray)
    
=== "web"
actual abstract fun setUShorts(offset: ULong, array: UShortArray)
    
=== "common" Writes a UShortArray into the buffer at the specified offset. === "android" Writes a UShortArray into the buffer at the specified offset. === "jvm" Writes a UShortArray into the buffer at the specified offset. === "native" Writes a UShortArray into the buffer at the specified offset. === "web" Writes a UShortArray into the buffer at the specified offset. === "common, android, jvm, native, web" **Parameters** - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the unsigned short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the unsigned short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the unsigned short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the unsigned short array to write - offset: the byte offset where to start writing (must be aligned to 2 bytes) - array: the unsigned short array to write

toByteArray

=== "common"
expect abstract fun toByteArray(): ByteArray
    
=== "android"
actual abstract fun toByteArray(): ByteArray
    
=== "jvm"
actual abstract fun toByteArray(): ByteArray
    
=== "native"
actual abstract fun toByteArray(): ByteArray
    
=== "web"
actual abstract fun toByteArray(): ByteArray
    
=== "common" Converts the buffer to a ByteArray. **Return** a ByteArray containing the buffer's data === "android" Converts the buffer to a ByteArray. **Return** a ByteArray containing the buffer's data === "jvm" Converts the buffer to a ByteArray. **Return** a ByteArray containing the buffer's data === "native" Converts the buffer to a ByteArray. **Return** a ByteArray containing the buffer's data === "web" Converts the buffer to a ByteArray. **Return** a ByteArray containing the buffer's data

toDoubleArray

=== "common"
expect abstract fun toDoubleArray(): DoubleArray
    
=== "android"
actual abstract fun toDoubleArray(): DoubleArray
    
=== "jvm"
actual abstract fun toDoubleArray(): DoubleArray
    
=== "native"
actual abstract fun toDoubleArray(): DoubleArray
    
=== "web"
actual abstract fun toDoubleArray(): DoubleArray
    
=== "common" Converts the buffer to a DoubleArray. **Return** a DoubleArray containing the buffer's data (size must be multiple of 8) === "android" Converts the buffer to a DoubleArray. **Return** a DoubleArray containing the buffer's data (size must be multiple of 8) === "jvm" Converts the buffer to a DoubleArray. **Return** a DoubleArray containing the buffer's data (size must be multiple of 8) === "native" Converts the buffer to a DoubleArray. **Return** a DoubleArray containing the buffer's data (size must be multiple of 8) === "web" Converts the buffer to a DoubleArray. **Return** a DoubleArray containing the buffer's data (size must be multiple of 8)

toFloatArray

=== "common"
expect abstract fun toFloatArray(): FloatArray
    
=== "android"
actual abstract fun toFloatArray(): FloatArray
    
=== "jvm"
actual abstract fun toFloatArray(): FloatArray
    
=== "native"
actual abstract fun toFloatArray(): FloatArray
    
=== "web"
actual abstract fun toFloatArray(): FloatArray
    
=== "common" Converts the buffer to a FloatArray. **Return** a FloatArray containing the buffer's data (size must be multiple of 4) === "android" Converts the buffer to a FloatArray. **Return** a FloatArray containing the buffer's data (size must be multiple of 4) === "jvm" Converts the buffer to a FloatArray. **Return** a FloatArray containing the buffer's data (size must be multiple of 4) === "native" Converts the buffer to a FloatArray. **Return** a FloatArray containing the buffer's data (size must be multiple of 4) === "web" Converts the buffer to a FloatArray. **Return** a FloatArray containing the buffer's data (size must be multiple of 4)

toIntArray

=== "common"
expect abstract fun toIntArray(): IntArray
    
=== "android"
actual abstract fun toIntArray(): IntArray
    
=== "jvm"
actual abstract fun toIntArray(): IntArray
    
=== "native"
actual abstract fun toIntArray(): IntArray
    
=== "web"
actual abstract fun toIntArray(): IntArray
    
=== "common" Converts the buffer to an IntArray. **Return** an IntArray containing the buffer's data (size must be multiple of 4) === "android" Converts the buffer to an IntArray. **Return** an IntArray containing the buffer's data (size must be multiple of 4) === "jvm" Converts the buffer to an IntArray. **Return** an IntArray containing the buffer's data (size must be multiple of 4) === "native" Converts the buffer to an IntArray. **Return** an IntArray containing the buffer's data (size must be multiple of 4) === "web" Converts the buffer to an IntArray. **Return** an IntArray containing the buffer's data (size must be multiple of 4)

toShortArray

=== "common"
expect abstract fun toShortArray(): ShortArray
    
=== "android"
actual abstract fun toShortArray(): ShortArray
    
=== "jvm"
actual abstract fun toShortArray(): ShortArray
    
=== "native"
actual abstract fun toShortArray(): ShortArray
    
=== "web"
actual abstract fun toShortArray(): ShortArray
    
=== "common" Converts the buffer to a ShortArray. **Return** a ShortArray containing the buffer's data (size must be multiple of 2) === "android" Converts the buffer to a ShortArray. **Return** a ShortArray containing the buffer's data (size must be multiple of 2) === "jvm" Converts the buffer to a ShortArray. **Return** a ShortArray containing the buffer's data (size must be multiple of 2) === "native" Converts the buffer to a ShortArray. **Return** a ShortArray containing the buffer's data (size must be multiple of 2) === "web" Converts the buffer to a ShortArray. **Return** a ShortArray containing the buffer's data (size must be multiple of 2)

toUByteArray

=== "common"
expect abstract fun toUByteArray(): UByteArray
    
=== "android"
actual abstract fun toUByteArray(): UByteArray
    
=== "jvm"
actual abstract fun toUByteArray(): UByteArray
    
=== "native"
actual abstract fun toUByteArray(): UByteArray
    
=== "web"
actual abstract fun toUByteArray(): UByteArray
    
=== "common" Converts the buffer to a UByteArray. **Return** a UByteArray containing the buffer's data === "android" Converts the buffer to a UByteArray. **Return** a UByteArray containing the buffer's data === "jvm" Converts the buffer to a UByteArray. **Return** a UByteArray containing the buffer's data === "native" Converts the buffer to a UByteArray. **Return** a UByteArray containing the buffer's data === "web" Converts the buffer to a UByteArray. **Return** a UByteArray containing the buffer's data

toUIntArray

=== "common"
expect abstract fun toUIntArray(): UIntArray
    
=== "android"
actual abstract fun toUIntArray(): UIntArray
    
=== "jvm"
actual abstract fun toUIntArray(): UIntArray
    
=== "native"
actual abstract fun toUIntArray(): UIntArray
    
=== "web"
actual abstract fun toUIntArray(): UIntArray
    
=== "common" Converts the buffer to a UIntArray. **Return** a UIntArray containing the buffer's data (size must be multiple of 4) === "android" Converts the buffer to a UIntArray. **Return** a UIntArray containing the buffer's data (size must be multiple of 4) === "jvm" Converts the buffer to a UIntArray. **Return** a UIntArray containing the buffer's data (size must be multiple of 4) === "native" Converts the buffer to a UIntArray. **Return** a UIntArray containing the buffer's data (size must be multiple of 4) === "web" Converts the buffer to a UIntArray. **Return** a UIntArray containing the buffer's data (size must be multiple of 4)

toUShortArray

=== "common"
expect abstract fun toUShortArray(): UShortArray
    
=== "android"
actual abstract fun toUShortArray(): UShortArray
    
=== "jvm"
actual abstract fun toUShortArray(): UShortArray
    
=== "native"
actual abstract fun toUShortArray(): UShortArray
    
=== "web"
actual abstract fun toUShortArray(): UShortArray
    
=== "common" Converts the buffer to a UShortArray. **Return** a UShortArray containing the buffer's data (size must be multiple of 2) === "android" Converts the buffer to a UShortArray. **Return** a UShortArray containing the buffer's data (size must be multiple of 2) === "jvm" Converts the buffer to a UShortArray. **Return** a UShortArray containing the buffer's data (size must be multiple of 2) === "native" Converts the buffer to a UShortArray. **Return** a UShortArray containing the buffer's data (size must be multiple of 2) === "web" Converts the buffer to a UShortArray. **Return** a UShortArray containing the buffer's data (size must be multiple of 2)