How can I get a pointer to the inner array of a Java ByteBuffer?
JNIEXPORT void JNICALL test(JNIEnv *env, jobject thiso) { jclass cls = env->FindClass
void * data = env->GetDirectBufferAddress(obj);
The ByteBuffer must be a direct one for this to work.
If you're trying to return the address of the first element within m_buffer, then you can just do:
m_buffer
return m_buffer;
..or:
return &m_buffer[0]