From: William S F. <ws...@fu...> - 2007-09-25 08:49:10
|
Evgeni Sergeev <evgeni_sergeev <at> hotmail.com> writes: > > Hello,How can I tell SWIG to accept a pointer to a java.nio.ByteBuffer, > which is being passed to it by Java? Also, the size of the buffer is needed. > The aim is to have a contiguous memory space, which can be read and written > by both native code and Java code, for passing a large amount of data quickly. Take a look at the usual set of typemaps for Java eg jni, jtype, jstype. A Google code search such as this: http://www.google.com/codesearch?q=jstype+ByteBuffer&hl=en&btnG=Search+Code should take you to the GDAL typemaps which marshal void * as java.nio.ByteBuffer. William |