| Modifier and Type | Field and Description |
|---|---|
| public static Architecture | |
| public static Architecture. | |
| public static boolean | |
| public static boolean | |
| public static boolean | isARM
Deprecated
Use
architecture as SharedLibraryLoader.architecture == Architecture.ARM instead.
|
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| private static final HashSet | |
| private String | |
| public static Os | |
| private static final Random |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private boolean | |
| public static void | |
| public String | |
| public File | Returns: The extracted file.The file to extract from the classpath or JAR. sourcePath, String The name of the subdirectory where the file will be extracted. If null, the file's CRC will be used. dirName)Extracts the specified file to the specified directory if it does not already exist or the CRC does not match. |
| private File | |
| public void | extractFileTo(String
The file to extract from the classpath or JAR. sourcePath, File The location where the extracted file will be written. dir)Extracts the specified file into the temp directory if it does not already exist or the CRC does not match. |
| private File | Returns: null if a writable path could not be found.Returns a path to a file that can be written. |
| public static synchronized boolean | |
| public void | |
| private void | |
| private Throwable | |
| public String | mapLibraryName(String libraryName)
Maps a platform independent library name to a platform dependent name. |
| pack-priv static String | |
| private InputStream | |
| public static synchronized void |
| architecture | back to summary |
|---|---|
| public static Architecture architecture | |
| bitness | back to summary |
|---|---|
| public static Architecture. | |
| is64Bit | back to summary |
|---|---|
| public static boolean is64Bit
Deprecated Use | |
| isAndroid | back to summary |
|---|---|
| public static boolean isAndroid
Deprecated Use | |
| isARM | back to summary |
|---|---|
| public static boolean isARM
Deprecated Use | |
| isIos | back to summary |
|---|---|
| public static boolean isIos
Deprecated Use | |
| isLinux | back to summary |
|---|---|
| public static boolean isLinux
Deprecated Use | |
| isMac | back to summary |
|---|---|
| public static boolean isMac
Deprecated Use | |
| isWindows | back to summary |
|---|---|
| public static boolean isWindows
Deprecated Use | |
| loadedLibraries | back to summary |
|---|---|
| private static final HashSet<String> loadedLibraries | |
| nativesJar | back to summary |
|---|---|
| private String nativesJar | |
| os | back to summary |
|---|---|
| public static Os os | |
| random | back to summary |
|---|---|
| private static final Random random | |
| SharedLibraryLoader | back to summary |
|---|---|
| public SharedLibraryLoader() | |
| SharedLibraryLoader | back to summary |
|---|---|
| public SharedLibraryLoader(String nativesJar) Fetches the natives from the given natives jar file. Used for testing a shared lib on the fly. | |
| canExecute | back to summary |
|---|---|
| private boolean canExecute(File file) | |
| canWrite | back to summary |
|---|---|
| private boolean canWrite(File file) Returns true if the parent directories of the file can be created and the file can be written. | |
| closeQuietly | back to summary |
|---|---|
| public static void closeQuietly(Closeable c) | |
| crc | back to summary |
|---|---|
| public String crc(InputStream input) Returns a CRC of the remaining bytes in the stream. | |
| extractFile | back to summary |
|---|---|
| public File extractFile(String sourcePath, String dirName) throws IOException Extracts the specified file to the specified directory if it does not already exist or the CRC does not match. If file extraction fails and the file exists at java.library.path, that file is returned. | |
| extractFile | back to summary |
|---|---|
| private File extractFile(String sourcePath, String sourceCrc, File extractedFile) throws IOException | |
| extractFileTo | back to summary |
|---|---|
| public void extractFileTo(String sourcePath, File dir) throws IOException Extracts the specified file into the temp directory if it does not already exist or the CRC does not match. If file extraction fails and the file exists at java.library.path, that file is returned. | |
| getExtractedFile | back to summary |
|---|---|
| private File getExtractedFile(String dirName, String fileName) Returns a path to a file that can be written. Tries multiple locations and verifies writing succeeds.
| |
| isLoaded | back to summary |
|---|---|
| public static synchronized boolean isLoaded(String libraryName) | |
| load | back to summary |
|---|---|
| public void load(String libraryName) Loads a shared library for the platform the application is running on.
| |
| loadFile | back to summary |
|---|---|
| private void loadFile(String sourcePath) Extracts the source file and calls System.load. Attemps to extract and load from multiple locations. Throws runtime exception if all fail. | |
| loadFile | back to summary |
|---|---|
private Throwable loadFile(String sourcePath, String sourceCrc, File extractedFile)
| |
| mapLibraryName | back to summary |
|---|---|
| public String mapLibraryName(String libraryName) Maps a platform independent library name to a platform dependent name. | |
| randomUUID | back to summary |
|---|---|
| pack-priv static String randomUUID() | |
| readFile | back to summary |
|---|---|
| private InputStream readFile(String path) | |
| setLoaded | back to summary |
|---|---|
| public static synchronized void setLoaded(String libraryName) Sets the library as loaded, for when application code wants to handle libary loading itself. | |