java - How to convert/cast a jobject into jbyte* -


i deal byte array retrieved java callback function. however, got 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 pointer byte array in easy way instead of retrieving each element , copying it.

i think function looking getbytearrayelements. can cast data_obj have jbytearray , pass function.

also should passing pointer is_copy.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -