getRegion

context(env: JniEnv)
fun JBooleanArray.getRegion(start: Int, len: Int, buf: CArrayPointer<UByteVar>)(source)

Copies a region of a boolean[] array into a buffer buf.

Receiver

a boolean[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JByteArray.getRegion(start: Int, len: Int, buf: CArrayPointer<ByteVar>)(source)

Copies a region of a byte[] array into a buffer buf.

Receiver

a byte[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JCharArray.getRegion(start: Int, len: Int, buf: CArrayPointer<UShortVar>)(source)

Copies a region of a char[] array into a buffer buf.

Receiver

a char[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JShortArray.getRegion(start: Int, len: Int, buf: CArrayPointer<ShortVar>)(source)

Copies a region of a short[] array into a buffer buf.

Receiver

a short[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JIntArray.getRegion(start: Int, len: Int, buf: CPointer<IntVar>)(source)

Copies a region of a int[] array into a buffer buf.

Receiver

a int[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JLongArray.getRegion(start: Int, len: Int, buf: CPointer<LongVar>)(source)

Copies a region of a long[] array into a buffer buf.

Receiver

a long[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JFloatArray.getRegion(start: Int, len: Int, buf: CPointer<FloatVar>)(source)

Copies a region of a float[] array into a buffer buf.

Receiver

a float[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JDoubleArray.getRegion(start: Int, len: Int, buf: CPointer<DoubleVar>)(source)

Copies a region of a double[] array into a buffer buf.

Receiver

a double[] Java array.

Parameters

start

the starting index; must be greater than or equal to zero and less than the array length.

len

the number of elements to be copied, must be greater than or equal to zero and start + len must be less than or equal to array length.

buf

the destination buffer.

Throws

if one of the indexes in the region is not valid.


context(env: JniEnv)
fun JString.getRegion(start: Int, len: Int, buf: CArrayPointer<UShortVar>)(source)

Copies len number of Unicode characters beginning at offset start to the given buffer buf.

Receiver

a Java string object.

Since

JDK/JRE 1.2

Parameters

start

the index of the first Unicode character in the string to copy. Must be greater than or equal to zero, and less than string length.

len

the number of Unicode characters to copy. Must be greater than or equal to zero and start + len must be less than string length.

buf

the Unicode character buffer into which to copy the string region.

Throws

StringIndexOutOfBoundsException

on index overflow.