Package club.minnced.opus.util
Class OpusLibrary
- java.lang.Object
-
- club.minnced.opus.util.OpusLibrary
-
public final class OpusLibrary extends java.lang.ObjectInterface for opus binaries
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>getSupportedPlatforms()The currently supported platforms
These are using the format described by JNAstatic booleanisInitialized()Whether the library was successfully initialized already
This is set to true when a library was loaded without an exception.static booleanisSupportedPlatform()Whether the current platform is supportedstatic booleanloadFrom(java.lang.String absolutePath)Loads the library of the provided absolute pathstatic booleanloadFromJar()Loads the library from the current classpath
-
-
-
Method Detail
-
getSupportedPlatforms
public static java.util.List<java.lang.String> getSupportedPlatforms()
The currently supported platforms
These are using the format described by JNA- Returns:
- Immutable list of currently supported platforms
-
isSupportedPlatform
public static boolean isSupportedPlatform()
Whether the current platform is supported- Returns:
- True, if the current platform is supported
-
isInitialized
public static boolean isInitialized()
Whether the library was successfully initialized already
This is set to true when a library was loaded without an exception.- Returns:
- True, if the library was already initialized
-
loadFrom
public static boolean loadFrom(java.lang.String absolutePath)
Loads the library of the provided absolute path- Parameters:
absolutePath- The path to load from- Returns:
- True, if the library was loaded successfully.
False, if the library was already loaded before.
-
loadFromJar
public static boolean loadFromJar() throws java.io.IOExceptionLoads the library from the current classpath- Returns:
- True, if the library was loaded successfully.
False, if the library was already loaded before. - Throws:
java.io.IOException- If an I/O error occurredjava.lang.UnsupportedOperationException- If the current platform is not supported
-
-