
public class JNIPointerReference extends Object
For example, a function like this in native code:
int url_open(URLContext **handlePtr, char *name, int flags);
int url_read(URLContext *handle, void* buf, int len);
might map to the following Java method:
public class Example {
public native int url_open(JNIPointerReference p, String name, int flags);
public native int url_read(JNIPointerReference p, byte[] buf, int len);
public void example() {
int retval = 0;
JNIPointerReference p;
// p.setPointer is called by the native function
retval = url_open(p, "foo", 0);
// p.getPointer is called by the native function
byte[] buf = new bytes[1024];
retval = url_read(p, buf, buf.length);
}
IMPORTANT: DO NOT RENAME THIS CLASS OR METHODS IN IT. NATIVE CODE DEPENDS ON THE NAMES AND SIGNATURES.
| Constructor and Description |
|---|
JNIPointerReference()
Internal Only.
|
Copyright © 2018 Humble Software. All rights reserved.