Methods for External C Libraries
The methods for external C libraries are used for linking Application Builder methods with compiled C-code.
External Method
Name
Syntax
Description
external
External external(String name)
Returns an interface to an external C (native) library given by the name of the library feature. The External class uses the Java Native Interface (JNI) framework.
For more information, see the
Application Builder Reference Manual
.
Methods Returned by the External Method
The external method returns an object of type External with the following methods:
Name
Syntax
Description
invoke
long invoke(String method, Object... arguments)
Invokes the named native method in the library with the supplied arguments. Strings are converted to char *. Returns the value returned by the method.
invokeWideString
long invokeWideString(String method, Object... arguments)
Invokes the named native method in the library with the supplied arguments. Strings are converted to wchar_t *. Returns the value returned by the method.
close
void close()
Releases the library and frees resources. If you do not call this method, it is automatically invoked when the external library is no longer needed.