This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creating an array in a pre allocated address


Just correcting a ugly typo... :P

I 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?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]