All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.util.Unix

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

public class Unix
extends 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 Index

 o Unix()

Method Index

 o chroot(String)
Change the process root, using chroot system call.
 o getGID(String)
Get the identifier for that group.
 o getUID(String)
Get the identifier for that user.
 o getUnix()
Get the UNIX system call manger.
 o isResolved()
Can I perform UNIX system calls through that instance ?
 o setGID(int)
Set the group id for the running process.
 o setUID(int)
Set the user id for the running process.

Constructors

 o Unix
 public Unix()

Methods

 o getUnix
 public static synchronized Unix getUnix()
Get the UNIX system call manger.

Returns:
An instance of this class, suitable to call UNIX system calls.
 o 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.
 o getUID
 public int getUID(String uname)
Get the identifier for that user.

Returns:
The user's identifier, or -1 if user was not found.
 o getGID
 public int getGID(String gname)
Get the identifier for that group.

Returns:
The group identifier, or -1 if not found.
 o 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.
 o 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.
 o chroot
 public void chroot(String root) throws UnixException
Change the process root, using chroot system call.

Parameters:
root - The new root for the process.

All Packages  Class Hierarchy  This Package  Previous  Next  Index