I have an array of bytes and I want to pass it to C function using JNA. However I only found examples which allocated a pointer using new Memory and used write function to copy array data but for me is not acceptable because I have big block of data.
Is there a possibility just to pass my Java array directly to c library ?
I want to do something like this :
MyLib lib = Native.loadLibrary("test");
Pointer p = myByteArray; //I want to make it possible
lib.someFunction(p);