Package org.drasyl.crypto.loader
Class LibraryLoader
- java.lang.Object
-
- org.drasyl.crypto.loader.LibraryLoader
-
public class LibraryLoader extends Object
Helper class to load the libsodium library from the preferred location.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BUNDLED_ONLY
static String
PREFER_BUNDLED
static String
PREFER_SYSTEM
static String
SYSTEM_ONLY
-
Constructor Summary
Constructors Constructor Description LibraryLoader(Class classToRegister)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
getSodiumPathInResources()
static String
getSodiumPlatformDependentPath()
void
loadLibrary(String mode, String systemFallBack)
void
loadSystemLibrary(String library)
-
-
-
Field Detail
-
PREFER_SYSTEM
public static final String PREFER_SYSTEM
- See Also:
- Constant Field Values
-
PREFER_BUNDLED
public static final String PREFER_BUNDLED
- See Also:
- Constant Field Values
-
BUNDLED_ONLY
public static final String BUNDLED_ONLY
- See Also:
- Constant Field Values
-
SYSTEM_ONLY
public static final String SYSTEM_ONLY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LibraryLoader
public LibraryLoader(Class classToRegister)
-
-
Method Detail
-
getSodiumPlatformDependentPath
public static String getSodiumPlatformDependentPath()
-
getSodiumPathInResources
public static String getSodiumPathInResources() throws IOException
- Throws:
IOException
-
loadSystemLibrary
public void loadSystemLibrary(String library) throws IOException
- Throws:
IOException
-
loadLibrary
public void loadLibrary(String mode, String systemFallBack) throws IOException
- Throws:
IOException
-
-