|
libgdx API | |||||||||
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 |
isLinux
|
static boolean |
isMac
|
static boolean |
isWindows
|
Constructor Summary | |
---|---|
SharedLibraryLoader()
|
|
SharedLibraryLoader(java.lang.String nativesJar)
Fetches the natives from the given natives jar file. |
Method Summary | |
---|---|
java.lang.String |
crc(java.io.InputStream input)
Returns a CRC of the remaining bytes in the stream. |
java.io.File |
extractFile(java.lang.String sourcePath,
java.lang.String dirName)
Extracts the specified file into the temp directory if it does not already exist or the CRC does not match. |
void |
load(java.lang.String libraryName)
Loads a shared library for the platform the application is running on. |
java.lang.String |
mapLibraryName(java.lang.String libraryName)
Maps a platform independent library name to a platform dependent name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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 isAndroid
public static boolean is64Bit
Constructor Detail |
---|
public SharedLibraryLoader()
public SharedLibraryLoader(java.lang.String nativesJar)
nativesJar
- Method Detail |
---|
public java.lang.String crc(java.io.InputStream input)
public java.lang.String mapLibraryName(java.lang.String libraryName)
public void load(java.lang.String libraryName)
libraryName
- The platform independent library name. If not contain a prefix (eg lib) or suffix (eg .dll).public java.io.File extractFile(java.lang.String sourcePath, java.lang.String dirName) throws java.io.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.
java.io.IOException
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |