How to convert/cast a jobject into jbyte*
I would like to deal with a byte array which is retrieved from java
callback function. However, I got an error 'JNIEnv' has no member named
'GetObjectElements'
jmethodID FuncGetArray = GetStaticMethodID(clazz, "GetArray", "()[B");
jobject data_obj = env->CallStaticObjectMethod(clazz, FuncGetArray);
const jboolean is_copy = JNI_FALSE;
jbyte *byte_array = env->GetObjectElements(data_obj, is_copy);
Can I get the pointer to get the byte array in a easy way instead of
retrieving each element and copying it.
No comments:
Post a Comment