|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.utils.SharedLibraryLoader
public class SharedLibraryLoader
Loads shared libraries from a natives jar file (desktop) or arm folders (Android). For desktop projects, have the natives jar in the classpath, for Android projects put the shared libraries in the libs/armeabi and libs/armeabi-v7a folders.
Field Summary | |
---|---|
static boolean |
is64Bit
|
static boolean |
isAndroid
|
static boolean |
isIos
|
static boolean |
isLinux
|
static boolean |
isMac
|
static boolean |
isWindows
|
Constructor Summary | |
---|---|
SharedLibraryLoader()
|
|
SharedLibraryLoader(String nativesJar)
Fetches the natives from the given natives jar file. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean isWindows
public static boolean isLinux
public static boolean isMac
public static boolean isIos
public static boolean isAndroid
public static boolean is64Bit
Constructor Detail |
---|
public SharedLibraryLoader()
public SharedLibraryLoader(String nativesJar)
nativesJar
- Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |