Closeable
, AutoCloseable
public static class Advapi32Util.Privilege extends Object implements Closeable
Constructor | Description |
---|---|
Privilege(String... privileges) |
Construct and enable a set of privileges
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Calls disable() to remove the privileges
|
void |
disable() |
Disabled the prior enabled privilege
|
Advapi32Util.Privilege |
enable() |
Enables the given privileges.
|
public Privilege(String... privileges) throws IllegalArgumentException, Win32Exception
privileges
- the names of the privileges in the form of SE_* from Advapi32.javaIllegalArgumentException
Win32Exception
public void close()
close
in interface AutoCloseable
close
in interface Closeable
Closeable.close()
public Advapi32Util.Privilege enable() throws Win32Exception
Win32Exception
public void disable() throws Win32Exception
Win32Exception