Creating an array in a pre allocated address

Gabriel Bianco gabriel.bianco@pixeon.com.br
Fri Jan 25 18:44:00 GMT 2008


Is want some Java code to read something that was allocated in C++ code. 
I'm looking for something like this:

unsigned char* c = new unsigned char[100];

jbytearray data = JvNewByteArray( c, 100 );
javaObject->fun( data );

delete[] c;

I think that in JNI I can do something similiar with NewDirectByteBuffer().
Is there a function in CNI?



More information about the Java mailing list