put

fun put(value: Float): FloatBuffer

Relative put method. Writes the given float at the current position and then increments the position.

Return

this FloatBuffer.

Parameters

value

the float value to write.

Throws

if there is no space remaining (position equals limit).


fun put(index: Int, value: Float): FloatBuffer

Absolute put method. Writes the given float into the buffer at the specified index (in floats). Incorporates the baseOffset for sliced buffers.

Return

this FloatBuffer.

Parameters

index

the index at which to write.

value

the float value to write.

Throws

if index is out of bounds [0, limit).

kotlinx.io.IOException

if the underlying buffer cannot be written to.


fun put(src: FloatArray, offset: Int, length: Int): FloatBuffer

Relative bulk put method.

Transfers length floats from the source src array into this buffer, starting at the specified offset in src and at the current position in this buffer. After copying, the buffer's position is advanced by length.

Return

This buffer.

Parameters

src

The source array.

offset

The starting offset in the source array.

length

The number of floats to transfer.

Throws

if there is insufficient space in this buffer.

kotlinx.io.IOException

if the underlying buffer cannot be written to.


Relative bulk put method.

Transfers the entire content of the source src array into this buffer, starting at the current position. This method behaves the same as put(src, 0, src.size).

Return

This buffer.

Parameters

src

The source array.

Throws

if there is insufficient space in this buffer.

kotlinx.io.IOException

if the underlying buffer cannot be written to.