Package com.avpkit.ferry
Class JNIPointerReference
- java.lang.Object
-
- com.avpkit.ferry.JNIPointerReference
-
- Direct Known Subclasses:
FfmpegIOHandle
public class JNIPointerReference extends java.lang.Object
Internal Only. An Opaque handle that holds a Native mPointer/handle. This class holds a opaque long value that can be used to pass into JNI C function that expect a ** in C.For example, a function like this in native code:
might map to the following Java method:int url_open(URLContext **handlePtr, char *name, int flags); int url_read(URLContext *handle, void* buf, int len);
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 Summary
Constructors Constructor Description JNIPointerReference()Internal Only.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()Internal Only.
-
-
-
Constructor Detail
-
JNIPointerReference
public JNIPointerReference()
Internal Only.
-
-
Method Detail
-
toString
public java.lang.String toString()
Internal Only.- Overrides:
toStringin classjava.lang.Object
-
-