Language

JniEnvironment.Arrays Class

Definition

Provides Java array allocation, copying, element access, and marshaling.

public static class JniEnvironment.Arrays
type JniEnvironment.Arrays = class
Inheritance
JniEnvironment.Arrays

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Methods

Name Description
CreateMarshalBooleanArray(IEnumerable<Boolean>)

Reuses a Java boolean-array wrapper or creates one from a managed sequence.

CreateMarshalCharArray(IEnumerable<Char>)

Reuses a Java char-array wrapper or creates one from a managed sequence.

CreateMarshalDoubleArray(IEnumerable<Double>)

Reuses a Java double-array wrapper or creates one from a managed sequence.

CreateMarshalInt16Array(IEnumerable<Int16>)

Reuses a Java short-array wrapper or creates one from a managed sequence.

CreateMarshalInt32Array(IEnumerable<Int32>)

Reuses a Java int-array wrapper or creates one from a managed sequence.

CreateMarshalInt64Array(IEnumerable<Int64>)

Reuses a Java long-array wrapper or creates one from a managed sequence.

CreateMarshalObjectArray<T>(IEnumerable<T>)

Reuses a matching Java object-array wrapper or creates one from a managed sequence.

CreateMarshalSByteArray(IEnumerable<SByte>)

Reuses a Java byte-array wrapper or creates one from a managed sequence.

CreateMarshalSingleArray(IEnumerable<Single>)

Reuses a Java float-array wrapper or creates one from a managed sequence.

GetArrayLength(JniObjectReference)

Gets the number of elements in a Java array.

GetBooleanArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java boolean-array elements.

GetBooleanArrayRegion(JniObjectReference, Int32, Int32, Boolean*)

Copies a region of a Java boolean array into a caller-owned buffer.

GetByteArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java byte-array elements.

GetByteArrayRegion(JniObjectReference, Int32, Int32, SByte*)

Copies a region of a Java byte array into a caller-owned buffer.

GetCharArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java char-array elements.

GetCharArrayRegion(JniObjectReference, Int32, Int32, Char*)

Copies a region of a Java char array into a caller-owned buffer.

GetDoubleArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java double-array elements.

GetDoubleArrayRegion(JniObjectReference, Int32, Int32, Double*)

Copies a region of a Java double array into a caller-owned buffer.

GetFloatArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java float-array elements.

GetFloatArrayRegion(JniObjectReference, Int32, Int32, Single*)

Copies a region of a Java float array into a caller-owned buffer.

GetIntArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java int-array elements.

GetIntArrayRegion(JniObjectReference, Int32, Int32, Int32*)

Copies a region of a Java int array into a caller-owned buffer.

GetLongArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java long-array elements.

GetLongArrayRegion(JniObjectReference, Int32, Int32, Int64*)

Copies a region of a Java long array into a caller-owned buffer.

GetObjectArrayElement(JniObjectReference, Int32)

Reads an element of a Java object array.

GetPrimitiveArrayCritical(JniObjectReference, Boolean*)

Obtains a primitive-array critical buffer. Keep the critical region short and avoid other JNI calls or blocking waits for Java threads.

GetShortArrayElements(JniObjectReference, Boolean*)

Obtains a native-access buffer for Java short-array elements.

GetShortArrayRegion(JniObjectReference, Int32, Int32, Int16*)

Copies a region of a Java short array into a caller-owned buffer.

NewBooleanArray(Int32)

Allocates a Java boolean array.

NewByteArray(Int32)

Allocates a Java byte array.

NewCharArray(Int32)

Allocates a Java char array.

NewDoubleArray(Int32)

Allocates a Java double array.

NewFloatArray(Int32)

Allocates a Java float array.

NewIntArray(Int32)

Allocates a Java int array.

NewLongArray(Int32)

Allocates a Java long array.

NewObjectArray(Int32, JniObjectReference, JniObjectReference)

Allocates a Java object array and initializes every element to the supplied reference.

NewShortArray(Int32)

Allocates a Java short array.

ReleaseBooleanArrayElements(JniObjectReference, Boolean*, JniReleaseArrayElementsMode)

Releases or commits a Java boolean-array elements buffer.

ReleaseByteArrayElements(JniObjectReference, SByte*, JniReleaseArrayElementsMode)

Releases or commits a Java byte-array elements buffer.

ReleaseCharArrayElements(JniObjectReference, Char*, JniReleaseArrayElementsMode)

Releases or commits a Java char-array elements buffer.

ReleaseDoubleArrayElements(JniObjectReference, Double*, JniReleaseArrayElementsMode)

Releases or commits a Java double-array elements buffer.

ReleaseFloatArrayElements(JniObjectReference, Single*, JniReleaseArrayElementsMode)

Releases or commits a Java float-array elements buffer.

ReleaseIntArrayElements(JniObjectReference, Int32*, JniReleaseArrayElementsMode)

Releases or commits a Java int-array elements buffer.

ReleaseLongArrayElements(JniObjectReference, Int64*, JniReleaseArrayElementsMode)

Releases or commits a Java long-array elements buffer.

ReleasePrimitiveArrayCritical(JniObjectReference, IntPtr, JniReleaseArrayElementsMode)

Releases or commits a primitive-array critical buffer.

ReleaseShortArrayElements(JniObjectReference, Int16*, JniReleaseArrayElementsMode)

Releases or commits a Java short-array elements buffer.

SetBooleanArrayRegion(JniObjectReference, Int32, Int32, Boolean*)

Copies a caller-owned buffer into a region of a Java boolean array.

SetByteArrayRegion(JniObjectReference, Int32, Int32, SByte*)

Copies a caller-owned buffer into a region of a Java byte array.

SetCharArrayRegion(JniObjectReference, Int32, Int32, Char*)

Copies a caller-owned buffer into a region of a Java char array.

SetDoubleArrayRegion(JniObjectReference, Int32, Int32, Double*)

Copies a caller-owned buffer into a region of a Java double array.

SetFloatArrayRegion(JniObjectReference, Int32, Int32, Single*)

Copies a caller-owned buffer into a region of a Java float array.

SetIntArrayRegion(JniObjectReference, Int32, Int32, Int32*)

Copies a caller-owned buffer into a region of a Java int array.

SetLongArrayRegion(JniObjectReference, Int32, Int32, Int64*)

Copies a caller-owned buffer into a region of a Java long array.

SetObjectArrayElement(JniObjectReference, Int32, JniObjectReference)

Stores an object-array element without consuming the supplied reference.

SetShortArrayRegion(JniObjectReference, Int32, Int32, Int16*)

Copies a caller-owned buffer into a region of a Java short array.

Applies to