How to read a bytearray in JNI?
问题 Is it possible to just reference a entire bytearray in JNI but not invoking any copy ? In native C code, I have a bytearray passing from Java, and I just want to compare some data to this bytearray so I do not want to do any memory copy. Is it possible ? I know I could get the pointer of a bytearray in native by using GetPrimitiveArrayCritical something like that JNIEXPORT jbyteArray JNICALL Java_nfore_android_bt_pro_nfhfp_dsp (JNIEnv *env, jobject jobj, jbyteArray jbIn, jbyteArray jbBase){