public class SharedLibraryLoader extends Object
Modifier and Type | Field and Description |
---|---|
static String |
abi |
static boolean |
is64Bit |
static boolean |
isAndroid |
static boolean |
isARM |
static boolean |
isIos |
static boolean |
isLinux |
static boolean |
isMac |
static boolean |
isWindows |
Constructor and Description |
---|
SharedLibraryLoader() |
SharedLibraryLoader(String nativesJar)
Fetches the natives from the given natives jar file.
|
Modifier and Type | Method and Description |
---|---|
String |
crc(InputStream input)
Returns a CRC of the remaining bytes in the stream.
|
File |
extractFile(String sourcePath,
String dirName)
Extracts the specified file into the temp directory if it does not already exist or the CRC does not match.
|
void |
load(String libraryName)
Loads a shared library for the platform the application is running on.
|
String |
mapLibraryName(String libraryName)
Maps a platform independent library name to a platform dependent name.
|
public static boolean isWindows
public static boolean isLinux
public static boolean isMac
public static boolean isIos
public static boolean isAndroid
public static boolean isARM
public static boolean is64Bit
public static String abi
public SharedLibraryLoader()
public SharedLibraryLoader(String nativesJar)
nativesJar
- public String crc(InputStream input)
public String mapLibraryName(String libraryName)
public void load(String libraryName)
libraryName
- The platform independent library name. If not contain a prefix (eg lib) or suffix (eg .dll).public File extractFile(String sourcePath, String dirName) throws IOException
sourcePath
- The file to extract from the classpath or JAR.dirName
- The name of the subdirectory where the file will be extracted. If null, the file's CRC will be used.IOException
Copyright © 2015. All rights reserved.