jbyte *cContent = (*env)->GetByteArrayElements(env, javaByteArray, &isCopy);
if (cContent == NULL) {
// Handle error
return;
}
if (isCopy){
//表示返回的结果来自,原内容的拷贝
}
// Modify the array if needed
(*env)->ReleaseByteArrayElements(env, javaByteArray, cContent, 0); // Default: copy changes and free buffer
// or
// (*env)->ReleaseByteArrayElements(env, javaByteArray, cContent, JNI_COMMIT); // Commit changes but keep buffer,需要再将进行释放
// or
// (*env)->ReleaseByteArrayElements(env, javaByteArray, cContent, JNI_ABORT); // Discard changes and free buffer