public final class SerialComBluetoothJNIBridge extends Object
This class is an interface between java and native shared library. The native library is found in 'lib-bluetooth' folder in 'scm-x.x.x.jar' file.
| Constructor and Description |
|---|
SerialComBluetoothJNIBridge()
Allocates a new SerialComBluetoothJNIBridge object.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
listBluetoothAdaptorsWithInfo() |
static boolean |
loadNativeLibrary(String directoryPath,
String loadedLibName,
SerialComSystemProperty serialComSystemProperty,
int osType,
int cpuArch,
int javaABIType,
int btStack)
Extract native library from jar in a working directory, load and link it.
|
public SerialComBluetoothJNIBridge()
Allocates a new SerialComBluetoothJNIBridge object.
public static boolean loadNativeLibrary(String directoryPath, String loadedLibName, SerialComSystemProperty serialComSystemProperty, int osType, int cpuArch, int javaABIType, int btStack) throws SecurityException, SerialComUnexpectedException, SerialComLoadException, UnsatisfiedLinkError
Extract native library from jar in a working directory, load and link it. The 'lib-bluetooth' folder in 'scm-x.x.x.jar' file is searched for the required native library for bluetooth communication.
directoryPath - null for default directory or user supplied directory path.loadedLibName - null for default name or user supplied name of loaded library.serialComSystemProperty - instance of SerialComSystemProperty to get required java
properties.cpuArch - architecture of CPU this library is running on.osType - operating system this library is running on.javaABIType - binary application interface type to correctly link.SecurityException - if java system properties can not be accessed.SerialComUnexpectedException - if java system property is null.SerialComLoadException - if any file system related issue occurs.UnsatisfiedLinkError - if loading/linking shared library fails.public String[] listBluetoothAdaptorsWithInfo()
Copyright © 2016. All rights reserved.