I am trying to convert a jbyteArray to native c string (char*) in jni? Unfortunately I can't find any documentation on how to do that. I'm invoking a java function with the following prototype in the c code.
public static byte[] processFile(byte[] p_fileContent)
In the c code I am invoking this function which is returning a byte array. The content of this byte array is a java string. But I need to convert it to a c string.
jbyteArray arr = (jbyteArray) env->CallObjectMethod(clsH, midMain, jb);
printf("%s\n", (char*) arr);