- Joined
- Aug 28, 2009
- Messages
- 2
- Reaction score
- 0
I am passing a DirectByteBuffer from my C code to java code in parameter of java function that I am calling.
Here is what I am doing:
But I am getting UnsupportedOperationException on java side when I do byteBuffer.array().
I checked the address of the data that I am giving to direct byte buffer and its a valid address.
Is there anything I am missing?
Here is what I am doing:
Code:
jobject j_data = (*env)->(*env)->NewDirectByteBuffer(env, data, len);
(*env)->CallStaticVoidMethod(env, j_class, j_method_id, j_data);
But I am getting UnsupportedOperationException on java side when I do byteBuffer.array().
I checked the address of the data that I am giving to direct byte buffer and its a valid address.
Is there anything I am missing?