This chapter
here (see 3.3) says about arrays in the JNI programming. If you want to return
byte[] from a Java method (the array will internally have its length, so you don't need to pass it separately), try to compile it with
javah and see what comes out. Then, using the methods described in the JNI Programmer's Guide you can convert the C array to a JNI-Java array and return it.
Thank you for any pointers.
Nice pun