java - JNA pointer to unsigned char* -


i have array of bytes , want pass c function using jna. found examples allocated pointer using new memory , used write function copy array data me not acceptable because have big block of data.

is there possibility pass java array directly c library ?

i want :

mylib lib = native.loadlibrary("test"); pointer p = mybytearray; //i want make possible lib.somefunction(p); 

passing primitive array or pointer memory equivalent operations, i.e. can map this:

public interface mylibrary extends library {     void somefunction(byte[] input);     void somefunction(pointer input); } 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -