public class Loader
extends java.lang.Object
Constructor and Description |
---|
Loader() |
Modifier and Type | Method and Description |
---|---|
static void |
checkError(int errorCode)
Check return code of library calls.
|
static long |
fromUInt32(int value)
Convert int to 32 bit unsigned representation in a long.
|
static java.lang.String |
prepareLib(java.lang.String pathStub,
java.lang.String resourceStub,
java.lang.String nameStub) |
static int |
toUint32(long value)
As Java has no uint32, the parameter must be a long, but it must result
in an int, that holds the binary version of the uint32.
|
public static java.lang.String prepareLib(java.lang.String pathStub, java.lang.String resourceStub, java.lang.String nameStub)
public static void checkError(int errorCode) throws java.io.IOException
errorCode
- Code reported by the C-API.java.lang.IllegalArgumentException
- If the underlying API detects an illegal argument.java.lang.IndexOutOfBoundsException
- If the underlying API was forced to access an invalid array element.java.lang.IllegalStateException
- If a method is called that should not be called in the current state.java.io.IOException
- Unrecoverable error in the lower API levels, in most cases an unpredictable communication error with the hardware.java.lang.RuntimeException
- If the API reports an unknown error, this should never be occur except for the case of a bug inside the API.public static int toUint32(long value)
value
- public static long fromUInt32(int value)
value
-