How to update bytearray in C through JNI without returning a bytearray
Posted
by
Android007
on Stack Overflow
See other posts from Stack Overflow
or by Android007
Published on 2011-03-13T16:07:09Z
Indexed on
2011/03/13
16:10 UTC
Read the original article
Hit count: 489
Just wondering whether it is possible to update a ByteArray in C Code, which is created in Java, without returning it from C.
I have situation, where I need to update a single bytearray for multiple times through JNI and returning bytearray from C takes lot of JNI calls. Please let me know if anybody knows how to do this?
Code should be something like this
Java Code
byte[] storeData;
updateFromNative(storeData); //update the byteArray in native code;
//use the storeData in Java with updated value.
© Stack Overflow or respective owner