public class Unsafe extends Object
| Constructor and Description |
|---|
Unsafe() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
setegid(int gid)
Sets the process' effective gid to the specified value.
|
static boolean |
seteuid(int uid)
Sets the process' effective uid to the specified value.
|
static void |
setGCEnabled(boolean enabled)
Enables or disables garbage collection.
|
static boolean |
setgid(int gid)
Sets the process' gid to the specified value.
|
static boolean |
setuid(int uid)
Sets the process' uid to the specified value.
|
static void |
sleep(int millis)
Causes the current thread to block for the specified number of
milliseconds.
|
public static void setGCEnabled(boolean enabled)
Calls to this method do not nest. Regardless of how many times you disable GC, only one call is required to reenable it.
public static void sleep(int millis)
Thread.sleep(long) is only accurate to around 12ms which
is wholly unacceptable.public static boolean setuid(int uid)
public static boolean setgid(int gid)
public static boolean seteuid(int uid)
public static boolean setegid(int gid)
Copyright © 2015. All rights reserved.