## org.w3c.util
Class Unix

    java.lang.Object
      |
      +--org.w3c.util.Unix

public class Unix
extends java.lang.Object

Native methods to do some UNIX specific system calls. This class can be used on UNIX variants to access some specific system calls.

Constructor Summary
`Unix()`

Method Summary
`void` `chroot(java.lang.String root)` Change the process root, using `chroot` system call.
`int` `getGID(java.lang.String gname)` Get the group identifier for that group.
`int` `getUID(java.lang.String uname)` Get the user identifier for that user.
`static Unix` `getUnix()` Get the UNIX system call manger.
`boolean` `isResolved()` Can I perform UNIX system calls through that instance ?
`void` `setGID(int gid)` Set the group id for the running process.
`void` `setUID(int uid)` Set the user id for the running process.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Unix

    public Unix()

Method Detail

### getUnix

    public static Unix getUnix()

  Get the UNIX system call manger.
  Returns:
    An instance of this class, suitable to call UNIX system calls.

### isResolved

    public boolean isResolved()

  Can I perform UNIX system calls through that instance ?
  Returns:
    A boolean, true if these system calls are allowed, false otherwise.

### getUID

    public int getUID(java.lang.String uname)

  Get the user identifier for that user.
  Returns:
    The user's identifier, or -1 if user was not found.

### getGID

    public int getGID(java.lang.String gname)

  Get the group identifier for that group.
  Returns:
    The group identifier, or -1 if not found.

### setUID

    public void setUID(int uid)
                throws UnixException

  Set the user id for the running process.
  Parameters:
    `uid` - The new user identifier for the process.
  Throws:
    UnixException - If failed.

### setGID

    public void setGID(int gid)
                throws UnixException

  Set the group id for the running process.
  Parameters:
    `gid` - The new user identifier for the process.
  Throws:
    UnixException - If failed.

### chroot

    public void chroot(java.lang.String root)
                throws UnixException

  Change the process root, using `chroot` system call.
  Parameters:
    `root` - The new root for the process.
  Throws:
    UnixException - If failed.