Package android.system
Class Os
- java.lang.Object
-
- android.system.Os
-
public final class Os extends Object
Access to low-level system functionality. Most of these are system calls. Most users will want to use higher-level APIs where available, but this class provides access to the underlying primitives used to implement the higher-level APIs.The corresponding constants can be found in
OsConstants.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileDescriptoraccept(FileDescriptor fd, InetSocketAddress peerAddress)See accept(2).static FileDescriptoraccept(FileDescriptor fd, SocketAddress peerAddress)TODO Change the public API by removing the overload above and unhiding this version.static booleanaccess(String path, int mode)See access(2).static InetAddress[]android_getaddrinfo(String node, StructAddrinfo hints, int netId)static voidbind(FileDescriptor fd, InetAddress address, int port)See bind(2).static voidbind(FileDescriptor fd, SocketAddress address)static voidchmod(String path, int mode)See chmod(2).static voidchown(String path, int uid, int gid)See chown(2).static voidclose(FileDescriptor fd)See close(2).static voidconnect(FileDescriptor fd, InetAddress address, int port)See connect(2).static voidconnect(FileDescriptor fd, SocketAddress address)static FileDescriptordup(FileDescriptor oldFd)See dup(2).static FileDescriptordup2(FileDescriptor oldFd, int newFd)See dup2(2).static String[]environ()See environ(3).static voidexecv(String filename, String[] argv)See execv(2).static voidexecve(String filename, String[] argv, String[] envp)See execve(2).static voidfchmod(FileDescriptor fd, int mode)See fchmod(2).static voidfchown(FileDescriptor fd, int uid, int gid)See fchown(2).static intfcntlFlock(FileDescriptor fd, int cmd, StructFlock arg)static intfcntlInt(FileDescriptor fd, int cmd, int arg)static intfcntlVoid(FileDescriptor fd, int cmd)static voidfdatasync(FileDescriptor fd)See fdatasync(2).static StructStatfstat(FileDescriptor fd)See fstat(2).static StructStatVfsfstatvfs(FileDescriptor fd)See fstatvfs(2).static voidfsync(FileDescriptor fd)See fsync(2).static voidftruncate(FileDescriptor fd, long length)See ftruncate(2).static Stringgai_strerror(int error)See gai_strerror(3).static intgetegid()See getegid(2).static Stringgetenv(String name)See getenv(3).static intgeteuid()See geteuid(2).static intgetgid()See getgid(2).static Stringgetnameinfo(InetAddress address, int flags)static SocketAddressgetpeername(FileDescriptor fd)See getpeername(2).static intgetpgid(int pid)static intgetpid()See getpid(2).static intgetppid()See getppid(2).static StructPasswdgetpwnam(String name)static StructPasswdgetpwuid(int uid)static SocketAddressgetsockname(FileDescriptor fd)See getsockname(2).static intgetsockoptByte(FileDescriptor fd, int level, int option)static InetAddressgetsockoptInAddr(FileDescriptor fd, int level, int option)static intgetsockoptInt(FileDescriptor fd, int level, int option)static StructLingergetsockoptLinger(FileDescriptor fd, int level, int option)static StructTimevalgetsockoptTimeval(FileDescriptor fd, int level, int option)static StructUcredgetsockoptUcred(FileDescriptor fd, int level, int option)static intgettid()See gettid(2).static intgetuid()See getuid(2).static intgetxattr(String path, String name, byte[] outValue)static Stringif_indextoname(int index)See if_indextoname(3).static InetAddressinet_pton(int family, String address)See inet_pton(3).static InetAddressioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName)static intioctlInt(FileDescriptor fd, int cmd, MutableInt arg)static booleanisatty(FileDescriptor fd)See isatty(3).static voidkill(int pid, int signal)See kill(2).static voidlchown(String path, int uid, int gid)See lchown(2).static voidlink(String oldPath, String newPath)See link(2).static voidlisten(FileDescriptor fd, int backlog)See listen(2).static longlseek(FileDescriptor fd, long offset, int whence)See lseek(2).static StructStatlstat(String path)See lstat(2).static voidmincore(long address, long byteCount, byte[] vector)See mincore(2).static voidmkdir(String path, int mode)See mkdir(2).static voidmkfifo(String path, int mode)See mkfifo(3).static voidmlock(long address, long byteCount)See mlock(2).static longmmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset)See mmap(2).static voidmsync(long address, long byteCount, int flags)See msync(2).static voidmunlock(long address, long byteCount)See munlock(2).static voidmunmap(long address, long byteCount)See munmap(2).static FileDescriptoropen(String path, int flags, int mode)See open(2).static FileDescriptor[]pipe()See pipe(2).static FileDescriptor[]pipe2(int flags)static intpoll(StructPollfd[] fds, int timeoutMs)See poll(2).static voidposix_fallocate(FileDescriptor fd, long offset, long length)See posix_fallocate(2).static intprctl(int option, long arg2, long arg3, long arg4, long arg5)See prctl(2).static intpread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset)See pread(2).static intpread(FileDescriptor fd, ByteBuffer buffer, long offset)See pread(2).static intpwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset)See pwrite(2).static intpwrite(FileDescriptor fd, ByteBuffer buffer, long offset)See pwrite(2).static intread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount)See read(2).static intread(FileDescriptor fd, ByteBuffer buffer)See read(2).static Stringreadlink(String path)See readlink(2).static intreadv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts)See readv(2).static intrecvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)See recvfrom(2).static intrecvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)See recvfrom(2).static voidremove(String path)See remove(3).static voidremovexattr(String path, String name)static voidrename(String oldPath, String newPath)See rename(2).static longsendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount)See sendfile(2).static intsendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)See sendto(2).static intsendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, SocketAddress address)static intsendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)See sendto(2).static voidsetegid(int egid)See setegid(2).static voidsetenv(String name, String value, boolean overwrite)See setenv(3).static voidseteuid(int euid)See seteuid(2).static voidsetgid(int gid)See setgid(2).static voidsetpgid(int pid, int pgid)static voidsetregid(int rgid, int egid)static voidsetreuid(int ruid, int euid)static intsetsid()See setsid(2).static voidsetsockoptByte(FileDescriptor fd, int level, int option, int value)static voidsetsockoptGroupReq(FileDescriptor fd, int level, int option, StructGroupReq value)static voidsetsockoptGroupSourceReq(FileDescriptor fd, int level, int option, StructGroupSourceReq value)static voidsetsockoptIfreq(FileDescriptor fd, int level, int option, String value)static voidsetsockoptInt(FileDescriptor fd, int level, int option, int value)static voidsetsockoptIpMreqn(FileDescriptor fd, int level, int option, int value)static voidsetsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value)static voidsetsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value)static voidsetuid(int uid)See setuid(2).static voidsetxattr(String path, String name, byte[] value, int flags)static voidshutdown(FileDescriptor fd, int how)See shutdown(2).static FileDescriptorsocket(int domain, int type, int protocol)See socket(2).static voidsocketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2)See socketpair(2).static StructStatstat(String path)See stat(2).static StructStatVfsstatvfs(String path)See statvfs(2).static Stringstrerror(int errno)See strerror(2).static Stringstrsignal(int signal)See strsignal(3).static voidsymlink(String oldPath, String newPath)See symlink(2).static longsysconf(int name)See sysconf(3).static voidtcdrain(FileDescriptor fd)See tcdrain(3).static voidtcsendbreak(FileDescriptor fd, int duration)See tcsendbreak(3).static intumask(int mask)See umask(2).static StructUtsnameuname()See uname(2).static voidunlink(String pathname)static voidunsetenv(String name)See unsetenv(3).static intwaitpid(int pid, MutableInt status, int options)See waitpid(2).static intwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount)See write(2).static intwrite(FileDescriptor fd, ByteBuffer buffer)See write(2).static intwritev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts)See writev(2).
-
-
-
Method Detail
-
accept
public static FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException
See accept(2).- Throws:
ErrnoExceptionSocketException
-
accept
public static FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException
TODO Change the public API by removing the overload above and unhiding this version.- Throws:
ErrnoExceptionSocketException
-
access
public static boolean access(String path, int mode) throws ErrnoException
See access(2).- Throws:
ErrnoException
-
android_getaddrinfo
public static InetAddress[] android_getaddrinfo(String node, StructAddrinfo hints, int netId) throws GaiException
- Throws:
GaiException
-
bind
public static void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException
See bind(2).- Throws:
ErrnoExceptionSocketException
-
bind
public static void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException
- Throws:
ErrnoExceptionSocketException
-
chmod
public static void chmod(String path, int mode) throws ErrnoException
See chmod(2).- Throws:
ErrnoException
-
chown
public static void chown(String path, int uid, int gid) throws ErrnoException
See chown(2).- Throws:
ErrnoException
-
close
public static void close(FileDescriptor fd) throws ErrnoException
See close(2).- Throws:
ErrnoException
-
connect
public static void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException
See connect(2).- Throws:
ErrnoExceptionSocketException
-
connect
public static void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException
- Throws:
ErrnoExceptionSocketException
-
dup
public static FileDescriptor dup(FileDescriptor oldFd) throws ErrnoException
See dup(2).- Throws:
ErrnoException
-
dup2
public static FileDescriptor dup2(FileDescriptor oldFd, int newFd) throws ErrnoException
See dup2(2).- Throws:
ErrnoException
-
environ
public static String[] environ()
See environ(3).
-
execv
public static void execv(String filename, String[] argv) throws ErrnoException
See execv(2).- Throws:
ErrnoException
-
execve
public static void execve(String filename, String[] argv, String[] envp) throws ErrnoException
See execve(2).- Throws:
ErrnoException
-
fchmod
public static void fchmod(FileDescriptor fd, int mode) throws ErrnoException
See fchmod(2).- Throws:
ErrnoException
-
fchown
public static void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException
See fchown(2).- Throws:
ErrnoException
-
fcntlFlock
public static int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, InterruptedIOException
- Throws:
ErrnoExceptionInterruptedIOException
-
fcntlInt
public static int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException
- Throws:
ErrnoException
-
fcntlVoid
public static int fcntlVoid(FileDescriptor fd, int cmd) throws ErrnoException
- Throws:
ErrnoException
-
fdatasync
public static void fdatasync(FileDescriptor fd) throws ErrnoException
See fdatasync(2).- Throws:
ErrnoException
-
fstat
public static StructStat fstat(FileDescriptor fd) throws ErrnoException
See fstat(2).- Throws:
ErrnoException
-
fstatvfs
public static StructStatVfs fstatvfs(FileDescriptor fd) throws ErrnoException
See fstatvfs(2).- Throws:
ErrnoException
-
fsync
public static void fsync(FileDescriptor fd) throws ErrnoException
See fsync(2).- Throws:
ErrnoException
-
ftruncate
public static void ftruncate(FileDescriptor fd, long length) throws ErrnoException
See ftruncate(2).- Throws:
ErrnoException
-
gai_strerror
public static String gai_strerror(int error)
See gai_strerror(3).
-
getegid
public static int getegid()
See getegid(2).
-
geteuid
public static int geteuid()
See geteuid(2).
-
getgid
public static int getgid()
See getgid(2).
-
getnameinfo
public static String getnameinfo(InetAddress address, int flags) throws GaiException
- Throws:
GaiException
-
getpeername
public static SocketAddress getpeername(FileDescriptor fd) throws ErrnoException
See getpeername(2).- Throws:
ErrnoException
-
getpgid
public static int getpgid(int pid) throws ErrnoException- Throws:
ErrnoException
-
getpid
public static int getpid()
See getpid(2).
-
getppid
public static int getppid()
See getppid(2).
-
getpwnam
public static StructPasswd getpwnam(String name) throws ErrnoException
- Throws:
ErrnoException
-
getpwuid
public static StructPasswd getpwuid(int uid) throws ErrnoException
- Throws:
ErrnoException
-
getsockname
public static SocketAddress getsockname(FileDescriptor fd) throws ErrnoException
See getsockname(2).- Throws:
ErrnoException
-
getsockoptByte
public static int getsockoptByte(FileDescriptor fd, int level, int option) throws ErrnoException
- Throws:
ErrnoException
-
getsockoptInAddr
public static InetAddress getsockoptInAddr(FileDescriptor fd, int level, int option) throws ErrnoException
- Throws:
ErrnoException
-
getsockoptInt
public static int getsockoptInt(FileDescriptor fd, int level, int option) throws ErrnoException
- Throws:
ErrnoException
-
getsockoptLinger
public static StructLinger getsockoptLinger(FileDescriptor fd, int level, int option) throws ErrnoException
- Throws:
ErrnoException
-
getsockoptTimeval
public static StructTimeval getsockoptTimeval(FileDescriptor fd, int level, int option) throws ErrnoException
- Throws:
ErrnoException
-
getsockoptUcred
public static StructUcred getsockoptUcred(FileDescriptor fd, int level, int option) throws ErrnoException
- Throws:
ErrnoException
-
gettid
public static int gettid()
See gettid(2).
-
getuid
public static int getuid()
See getuid(2).
-
getxattr
public static int getxattr(String path, String name, byte[] outValue) throws ErrnoException
- Throws:
ErrnoException
-
if_indextoname
public static String if_indextoname(int index)
See if_indextoname(3).
-
inet_pton
public static InetAddress inet_pton(int family, String address)
See inet_pton(3).
-
ioctlInetAddress
public static InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException
- Throws:
ErrnoException
-
ioctlInt
public static int ioctlInt(FileDescriptor fd, int cmd, MutableInt arg) throws ErrnoException
- Throws:
ErrnoException
-
isatty
public static boolean isatty(FileDescriptor fd)
See isatty(3).
-
kill
public static void kill(int pid, int signal) throws ErrnoExceptionSee kill(2).- Throws:
ErrnoException
-
lchown
public static void lchown(String path, int uid, int gid) throws ErrnoException
See lchown(2).- Throws:
ErrnoException
-
link
public static void link(String oldPath, String newPath) throws ErrnoException
See link(2).- Throws:
ErrnoException
-
listen
public static void listen(FileDescriptor fd, int backlog) throws ErrnoException
See listen(2).- Throws:
ErrnoException
-
lseek
public static long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException
See lseek(2).- Throws:
ErrnoException
-
lstat
public static StructStat lstat(String path) throws ErrnoException
See lstat(2).- Throws:
ErrnoException
-
mincore
public static void mincore(long address, long byteCount, byte[] vector) throws ErrnoExceptionSee mincore(2).- Throws:
ErrnoException
-
mkdir
public static void mkdir(String path, int mode) throws ErrnoException
See mkdir(2).- Throws:
ErrnoException
-
mkfifo
public static void mkfifo(String path, int mode) throws ErrnoException
See mkfifo(3).- Throws:
ErrnoException
-
mlock
public static void mlock(long address, long byteCount) throws ErrnoExceptionSee mlock(2).- Throws:
ErrnoException
-
mmap
public static long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoExceptionSee mmap(2).- Throws:
ErrnoException
-
msync
public static void msync(long address, long byteCount, int flags) throws ErrnoExceptionSee msync(2).- Throws:
ErrnoException
-
munlock
public static void munlock(long address, long byteCount) throws ErrnoExceptionSee munlock(2).- Throws:
ErrnoException
-
munmap
public static void munmap(long address, long byteCount) throws ErrnoExceptionSee munmap(2).- Throws:
ErrnoException
-
open
public static FileDescriptor open(String path, int flags, int mode) throws ErrnoException
See open(2).- Throws:
ErrnoException
-
pipe
public static FileDescriptor[] pipe() throws ErrnoException
See pipe(2).- Throws:
ErrnoException
-
pipe2
public static FileDescriptor[] pipe2(int flags) throws ErrnoException
- Throws:
ErrnoException
-
poll
public static int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException
See poll(2).Note that in Lollipop this could throw an
ErrnoExceptionwithEINTR. In later releases, the implementation will automatically just restart the system call with an appropriately reduced timeout.- Throws:
ErrnoException
-
posix_fallocate
public static void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException
See posix_fallocate(2).- Throws:
ErrnoException
-
prctl
public static int prctl(int option, long arg2, long arg3, long arg4, long arg5) throws ErrnoExceptionSee prctl(2).- Throws:
ErrnoException
-
pread
public static int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException
See pread(2).- Throws:
ErrnoExceptionInterruptedIOException
-
pread
public static int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException
See pread(2).- Throws:
ErrnoExceptionInterruptedIOException
-
pwrite
public static int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException
See pwrite(2).- Throws:
ErrnoExceptionInterruptedIOException
-
pwrite
public static int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException
See pwrite(2).- Throws:
ErrnoExceptionInterruptedIOException
-
read
public static int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException
See read(2).- Throws:
ErrnoExceptionInterruptedIOException
-
read
public static int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException
See read(2).- Throws:
ErrnoExceptionInterruptedIOException
-
readlink
public static String readlink(String path) throws ErrnoException
See readlink(2).- Throws:
ErrnoException
-
readv
public static int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException
See readv(2).- Throws:
ErrnoExceptionInterruptedIOException
-
recvfrom
public static int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException
See recvfrom(2).- Throws:
ErrnoExceptionSocketException
-
recvfrom
public static int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException
See recvfrom(2).- Throws:
ErrnoExceptionSocketException
-
remove
public static void remove(String path) throws ErrnoException
See remove(3).- Throws:
ErrnoException
-
removexattr
public static void removexattr(String path, String name) throws ErrnoException
- Throws:
ErrnoException
-
rename
public static void rename(String oldPath, String newPath) throws ErrnoException
See rename(2).- Throws:
ErrnoException
-
sendfile
public static long sendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount) throws ErrnoException
See sendfile(2).- Throws:
ErrnoException
-
sendto
public static int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException
See sendto(2).- Throws:
ErrnoExceptionSocketException
-
sendto
public static int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException
See sendto(2).- Throws:
ErrnoExceptionSocketException
-
sendto
public static int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, SocketAddress address) throws ErrnoException, SocketException
- Throws:
ErrnoExceptionSocketException
-
setegid
public static void setegid(int egid) throws ErrnoExceptionSee setegid(2).- Throws:
ErrnoException
-
setenv
public static void setenv(String name, String value, boolean overwrite) throws ErrnoException
See setenv(3).- Throws:
ErrnoException
-
seteuid
public static void seteuid(int euid) throws ErrnoExceptionSee seteuid(2).- Throws:
ErrnoException
-
setgid
public static void setgid(int gid) throws ErrnoExceptionSee setgid(2).- Throws:
ErrnoException
-
setpgid
public static void setpgid(int pid, int pgid) throws ErrnoException- Throws:
ErrnoException
-
setregid
public static void setregid(int rgid, int egid) throws ErrnoException- Throws:
ErrnoException
-
setreuid
public static void setreuid(int ruid, int euid) throws ErrnoException- Throws:
ErrnoException
-
setsid
public static int setsid() throws ErrnoExceptionSee setsid(2).- Throws:
ErrnoException
-
setsockoptByte
public static void setsockoptByte(FileDescriptor fd, int level, int option, int value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptIfreq
public static void setsockoptIfreq(FileDescriptor fd, int level, int option, String value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptInt
public static void setsockoptInt(FileDescriptor fd, int level, int option, int value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptIpMreqn
public static void setsockoptIpMreqn(FileDescriptor fd, int level, int option, int value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptGroupReq
public static void setsockoptGroupReq(FileDescriptor fd, int level, int option, StructGroupReq value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptGroupSourceReq
public static void setsockoptGroupSourceReq(FileDescriptor fd, int level, int option, StructGroupSourceReq value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptLinger
public static void setsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value) throws ErrnoException
- Throws:
ErrnoException
-
setsockoptTimeval
public static void setsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value) throws ErrnoException
- Throws:
ErrnoException
-
setuid
public static void setuid(int uid) throws ErrnoExceptionSee setuid(2).- Throws:
ErrnoException
-
setxattr
public static void setxattr(String path, String name, byte[] value, int flags) throws ErrnoException
- Throws:
ErrnoException
-
shutdown
public static void shutdown(FileDescriptor fd, int how) throws ErrnoException
See shutdown(2).- Throws:
ErrnoException
-
socket
public static FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException
See socket(2).- Throws:
ErrnoException
-
socketpair
public static void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoExceptionSee socketpair(2).- Throws:
ErrnoException
-
stat
public static StructStat stat(String path) throws ErrnoException
See stat(2).- Throws:
ErrnoException
-
statvfs
public static StructStatVfs statvfs(String path) throws ErrnoException
See statvfs(2).- Throws:
ErrnoException
-
strerror
public static String strerror(int errno)
See strerror(2).
-
strsignal
public static String strsignal(int signal)
See strsignal(3).
-
symlink
public static void symlink(String oldPath, String newPath) throws ErrnoException
See symlink(2).- Throws:
ErrnoException
-
sysconf
public static long sysconf(int name)
See sysconf(3).
-
tcdrain
public static void tcdrain(FileDescriptor fd) throws ErrnoException
See tcdrain(3).- Throws:
ErrnoException
-
tcsendbreak
public static void tcsendbreak(FileDescriptor fd, int duration) throws ErrnoException
See tcsendbreak(3).- Throws:
ErrnoException
-
umask
public static int umask(int mask)
See umask(2).
-
uname
public static StructUtsname uname()
See uname(2).
-
unlink
public static void unlink(String pathname) throws ErrnoException
- Throws:
ErrnoException
-
unsetenv
public static void unsetenv(String name) throws ErrnoException
See unsetenv(3).- Throws:
ErrnoException
-
waitpid
public static int waitpid(int pid, MutableInt status, int options) throws ErrnoExceptionSee waitpid(2).- Throws:
ErrnoException
-
write
public static int write(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException
See write(2).- Throws:
ErrnoExceptionInterruptedIOException
-
write
public static int write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException
See write(2).- Throws:
ErrnoExceptionInterruptedIOException
-
writev
public static int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException
See writev(2).- Throws:
ErrnoExceptionInterruptedIOException
-
-