| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | NativeLibraryLoader.LoadResult
A result of a single attempt to load a library. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final boolean | |
| private static final Logger | |
| private static final String | |
| private static final String | |
| private static final File |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static byte[] | Returns: The binary content of helperClass.- The helper clazz)Class provided by this bundleLoad the helper |
| private static void | |
| private static void | copyLibrary(URL
the URL of the library on classpath classpathUrl, File the destination temporary file. tmpFile)Copies the given shared library file from classpath to a temporary file. |
| private static void | |
| private static File | |
| private static boolean | load(String name, ClassLoader loader, List<NativeLibraryLoader.
Load the given library with the specified |
| pack-priv static boolean | loadFirstAvailable(ClassLoader loader, List<NativeLibraryLoader.
Loads the first available library in the collection with the specified
|
| private static boolean | |
| private static boolean | Returns: true if the library was successfully loaded.- The loader, final String ClassLoader where the native library will be loaded into- The native library path or name name, final boolean - Whether the native library will be loaded by path or by name absolute, List<NativeLibraryLoader.Loading the native library into the specified |
| private static NativeLibraryLoader. | Returns: the result of the load operation.the name of the library to load. name, boolean true if absolute)name is an absolute pathAttempts to load the library using the |
| private static NativeLibraryLoader. | Returns: the result of the load operation.The helper, final String NativeLibraryUtil helper classthe name of the library to load. name, final boolean true if absolute)name is an absolute path to the file.Attempts to load the library by reflectively using the |
| private static void | |
| private static void | |
| private static void | |
| private static Class | Returns: A new helper Class defined in the specified ClassLoader.- The loader, final Class<?> ClassLoader where to load the helper Class- The helper helper)ClassTry to load the helper |
| DELETE_LIB_PROPERTY_NAME | back to summary |
|---|---|
| private static final String DELETE_LIB_PROPERTY_NAME | |
| DELETE_NATIVE_LIB_AFTER_LOADING | back to summary |
|---|---|
| private static final boolean DELETE_NATIVE_LIB_AFTER_LOADING | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| NATIVE_RESOURCE_HOME | back to summary |
|---|---|
| private static final String NATIVE_RESOURCE_HOME | |
| WORK_DIR_PROPERTY_NAME | back to summary |
|---|---|
| private static final String WORK_DIR_PROPERTY_NAME | |
| WORKDIR | back to summary |
|---|---|
| private static final File WORKDIR | |
| NativeLibraryLoader | back to summary |
|---|---|
| private NativeLibraryLoader() | |
| classToByteArray | back to summary |
|---|---|
| private static byte[] classToByteArray(Class<?> clazz) throws ClassNotFoundException Load the helper
| |
| closeQuietly | back to summary |
|---|---|
| private static void closeQuietly(Closeable c) | |
| copyLibrary | back to summary |
|---|---|
| private static void copyLibrary(URL classpathUrl, File tmpFile) throws IOException Copies the given shared library file from classpath to a temporary file. | |
| debug | back to summary |
|---|---|
| private static void debug(String message, Throwable t) | |
| getWorkDir | back to summary |
|---|---|
| private static File getWorkDir() | |
| load | back to summary |
|---|---|
| private static boolean load(String name, ClassLoader loader, List<NativeLibraryLoader. Load the given library with the specified | |
| loadFirstAvailable | back to summary |
|---|---|
| pack-priv static boolean loadFirstAvailable(ClassLoader loader, List<NativeLibraryLoader. Loads the first available library in the collection with the specified
| |
| loadFromWorkdir | back to summary |
|---|---|
| private static boolean loadFromWorkdir(String name, ClassLoader loader, List<NativeLibraryLoader. | |
| loadLibrary | back to summary |
|---|---|
| private static boolean loadLibrary(final ClassLoader loader, final String name, final boolean absolute, List<NativeLibraryLoader. Loading the native library into the specified
| |
| loadLibraryFromCurrentClassloader | back to summary |
|---|---|
| private static NativeLibraryLoader. Attempts to load the library using the
| |
| loadLibraryFromHelperClassloader | back to summary |
|---|---|
| private static NativeLibraryLoader. Attempts to load the library by reflectively using the
| |
| log | back to summary |
|---|---|
| private static void log(String format, Object arg) | |
| log | back to summary |
|---|---|
| private static void log(String format, Object arg1, Object arg2) | |
| log | back to summary |
|---|---|
| private static void log(String format, Object arg1, Object arg2, Throwable t) | |
| tryToLoadClass | back to summary |
|---|---|
| private static Class Try to load the helper
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final Throwable | |
| pack-priv final boolean | |
| pack-priv final String | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| private | LoadResult(String name, boolean absolute, boolean loaded, boolean usingHelperClassloader, Throwable error)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private static NativeLibraryLoader. | |
| private static NativeLibraryLoader. |
| absolute | back to summary |
|---|---|
| pack-priv final boolean absolute | |
| error | back to summary |
|---|---|
| pack-priv final Throwable error | |
| loaded | back to summary |
|---|---|
| pack-priv final boolean loaded | |
| name | back to summary |
|---|---|
| pack-priv final String name | |
| usingHelperClassloader | back to summary |
|---|---|
| pack-priv final boolean usingHelperClassloader | |
| LoadResult | back to summary |
|---|---|
| private LoadResult(String name, boolean absolute, boolean loaded, boolean usingHelperClassloader, Throwable error) | |
| log | back to summary |
|---|---|
| pack-priv void log() | |
| newFailureResult | back to summary |
|---|---|
| private static NativeLibraryLoader. | |
| newSuccessResult | back to summary |
|---|---|
| private static NativeLibraryLoader. | |