This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Creating an array in a pre allocated address
- From: Gabriel Bianco <gabriel dot bianco at pixeon dot com dot br>
- To: java at gcc dot gnu dot org
- Date: Fri, 25 Jan 2008 16:41:56 -0200
- Subject: Creating an array in a pre allocated address
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?