Package com.kenai.jffi
Class LastError
java.lang.Object
com.kenai.jffi.LastError
Provides access to the value of errno on unix, or GetLastError on windows.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Lazy-initialization singleton holder -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
foreign
-
-
Constructor Details
-
LastError
private LastError()Creates a newLastError
instance
-
-
Method Details
-
getInstance
Gets the singleton instance of theLastError
object.- Returns:
- An instance of
LastError
-
getError
Deprecated.Gets the errno set by the last C function invoked by the current thread.- Returns:
- The value of errno/GetLastError()
-
get
public final int get()Gets the errno set by the last C function invoked by the current thread.- Returns:
- The value of errno/GetLastError()
-
set
public final void set(int value) Sets the system errno value.- Parameters:
value
- The value to set errno to.
-