Package libcore.io
Interface Os
- All Known Implementing Classes:
BlockGuardOs,ForwardingOs,Posix
public interface Os
-
Method Summary
Modifier and Type Method Description FileDescriptoraccept(FileDescriptor fd, InetSocketAddress peerAddress)booleanaccess(String path, int mode)voidbind(FileDescriptor fd, InetAddress address, int port)voidchmod(String path, int mode)voidchown(String path, int uid, int gid)voidclose(FileDescriptor fd)voidconnect(FileDescriptor fd, InetAddress address, int port)FileDescriptordup(FileDescriptor oldFd)FileDescriptordup2(FileDescriptor oldFd, int newFd)String[]environ()voidexecv(String filename, String[] argv)voidexecve(String filename, String[] argv, String[] envp)voidfchmod(FileDescriptor fd, int mode)voidfchown(FileDescriptor fd, int uid, int gid)intfcntlFlock(FileDescriptor fd, int cmd, StructFlock arg)intfcntlLong(FileDescriptor fd, int cmd, long arg)intfcntlVoid(FileDescriptor fd, int cmd)voidfdatasync(FileDescriptor fd)StructStatfstat(FileDescriptor fd)StructStatVfsfstatvfs(FileDescriptor fd)voidfsync(FileDescriptor fd)voidftruncate(FileDescriptor fd, long length)Stringgai_strerror(int error)InetAddress[]getaddrinfo(String node, StructAddrinfo hints)intgetegid()Stringgetenv(String name)intgeteuid()intgetgid()Stringgetnameinfo(InetAddress address, int flags)SocketAddressgetpeername(FileDescriptor fd)intgetpid()intgetppid()StructPasswdgetpwnam(String name)StructPasswdgetpwuid(int uid)SocketAddressgetsockname(FileDescriptor fd)intgetsockoptByte(FileDescriptor fd, int level, int option)InetAddressgetsockoptInAddr(FileDescriptor fd, int level, int option)intgetsockoptInt(FileDescriptor fd, int level, int option)StructLingergetsockoptLinger(FileDescriptor fd, int level, int option)StructTimevalgetsockoptTimeval(FileDescriptor fd, int level, int option)StructUcredgetsockoptUcred(FileDescriptor fd, int level, int option)intgettid()intgetuid()Stringif_indextoname(int index)InetAddressinet_pton(int family, String address)InetAddressioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName)intioctlInt(FileDescriptor fd, int cmd, MutableInt arg)booleanisatty(FileDescriptor fd)voidkill(int pid, int signal)voidlchown(String path, int uid, int gid)voidlisten(FileDescriptor fd, int backlog)longlseek(FileDescriptor fd, long offset, int whence)StructStatlstat(String path)voidmincore(long address, long byteCount, byte[] vector)voidmkdir(String path, int mode)voidmlock(long address, long byteCount)longmmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset)voidmsync(long address, long byteCount, int flags)voidmunlock(long address, long byteCount)voidmunmap(long address, long byteCount)FileDescriptoropen(String path, int flags, int mode)FileDescriptor[]pipe()intpoll(StructPollfd[] fds, int timeoutMs)intpread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset)intpread(FileDescriptor fd, ByteBuffer buffer, long offset)intpwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset)intpwrite(FileDescriptor fd, ByteBuffer buffer, long offset)intread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount)intread(FileDescriptor fd, ByteBuffer buffer)intreadv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts)intrecvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)intrecvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)voidremove(String path)voidrename(String oldPath, String newPath)longsendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount)intsendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)intsendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)voidsetegid(int egid)voidsetenv(String name, String value, boolean overwrite)voidseteuid(int euid)voidsetgid(int gid)intsetsid()voidsetsockoptByte(FileDescriptor fd, int level, int option, int value)voidsetsockoptGroupReq(FileDescriptor fd, int level, int option, StructGroupReq value)voidsetsockoptIfreq(FileDescriptor fd, int level, int option, String value)voidsetsockoptInt(FileDescriptor fd, int level, int option, int value)voidsetsockoptIpMreqn(FileDescriptor fd, int level, int option, int value)voidsetsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value)voidsetsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value)voidsetuid(int uid)voidshutdown(FileDescriptor fd, int how)FileDescriptorsocket(int domain, int type, int protocol)voidsocketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2)StructStatstat(String path)StructStatVfsstatvfs(String path)Stringstrerror(int errno)Stringstrsignal(int signal)voidsymlink(String oldPath, String newPath)longsysconf(int name)voidtcdrain(FileDescriptor fd)voidtcsendbreak(FileDescriptor fd, int duration)intumask(int mask)StructUtsnameuname()voidunsetenv(String name)intwaitpid(int pid, MutableInt status, int options)intwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount)intwrite(FileDescriptor fd, ByteBuffer buffer)intwritev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts)
-
Method Details
-
accept
FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException- Throws:
ErrnoExceptionSocketException
-
access
- Throws:
ErrnoException
-
bind
- Throws:
ErrnoExceptionSocketException
-
chmod
- Throws:
ErrnoException
-
chown
- Throws:
ErrnoException
-
close
- Throws:
ErrnoException
-
connect
void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException- Throws:
ErrnoExceptionSocketException
-
dup
- Throws:
ErrnoException
-
dup2
- Throws:
ErrnoException
-
environ
String[] environ() -
execv
- Throws:
ErrnoException
-
execve
- Throws:
ErrnoException
-
fchmod
- Throws:
ErrnoException
-
fchown
- Throws:
ErrnoException
-
fcntlVoid
- Throws:
ErrnoException
-
fcntlLong
- Throws:
ErrnoException
-
fcntlFlock
- Throws:
ErrnoException
-
fdatasync
- Throws:
ErrnoException
-
fstat
- Throws:
ErrnoException
-
fstatvfs
- Throws:
ErrnoException
-
fsync
- Throws:
ErrnoException
-
ftruncate
- Throws:
ErrnoException
-
gai_strerror
-
getaddrinfo
- Throws:
GaiException
-
getegid
int getegid() -
geteuid
int geteuid() -
getgid
int getgid() -
getenv
-
getnameinfo
- Throws:
GaiException
-
getpeername
- Throws:
ErrnoException
-
getpid
int getpid() -
getppid
int getppid() -
getpwnam
- Throws:
ErrnoException
-
getpwuid
- Throws:
ErrnoException
-
getsockname
- Throws:
ErrnoException
-
getsockoptByte
- Throws:
ErrnoException
-
getsockoptInAddr
- Throws:
ErrnoException
-
getsockoptInt
- Throws:
ErrnoException
-
getsockoptLinger
- Throws:
ErrnoException
-
getsockoptTimeval
- Throws:
ErrnoException
-
getsockoptUcred
- Throws:
ErrnoException
-
gettid
int gettid() -
getuid
int getuid() -
if_indextoname
-
inet_pton
-
ioctlInetAddress
InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException- Throws:
ErrnoException
-
ioctlInt
- Throws:
ErrnoException
-
isatty
-
kill
- Throws:
ErrnoException
-
lchown
- Throws:
ErrnoException
-
listen
- Throws:
ErrnoException
-
lseek
- Throws:
ErrnoException
-
lstat
- Throws:
ErrnoException
-
mincore
- Throws:
ErrnoException
-
mkdir
- Throws:
ErrnoException
-
mlock
- Throws:
ErrnoException
-
mmap
long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException- Throws:
ErrnoException
-
msync
- Throws:
ErrnoException
-
munlock
- Throws:
ErrnoException
-
munmap
- Throws:
ErrnoException
-
open
- Throws:
ErrnoException
-
pipe
- Throws:
ErrnoException
-
poll
- Throws:
ErrnoException
-
pread
- Throws:
ErrnoException
-
pread
int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException- Throws:
ErrnoException
-
pwrite
- Throws:
ErrnoException
-
pwrite
int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException- Throws:
ErrnoException
-
read
- Throws:
ErrnoException
-
read
- Throws:
ErrnoException
-
readv
int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException- Throws:
ErrnoException
-
recvfrom
int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException- Throws:
ErrnoExceptionSocketException
-
recvfrom
int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException- Throws:
ErrnoExceptionSocketException
-
remove
- Throws:
ErrnoException
-
rename
- Throws:
ErrnoException
-
sendto
int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException- Throws:
ErrnoExceptionSocketException
-
sendto
int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException- Throws:
ErrnoExceptionSocketException
-
sendfile
long sendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount) throws ErrnoException- Throws:
ErrnoException
-
setegid
- Throws:
ErrnoException
-
setenv
- Throws:
ErrnoException
-
seteuid
- Throws:
ErrnoException
-
setgid
- Throws:
ErrnoException
-
setsid
- Throws:
ErrnoException
-
setsockoptByte
- Throws:
ErrnoException
-
setsockoptIfreq
- Throws:
ErrnoException
-
setsockoptInt
- Throws:
ErrnoException
-
setsockoptIpMreqn
- Throws:
ErrnoException
-
setsockoptGroupReq
void setsockoptGroupReq(FileDescriptor fd, int level, int option, StructGroupReq value) throws ErrnoException- Throws:
ErrnoException
-
setsockoptLinger
void setsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value) throws ErrnoException- Throws:
ErrnoException
-
setsockoptTimeval
void setsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value) throws ErrnoException- Throws:
ErrnoException
-
setuid
- Throws:
ErrnoException
-
shutdown
- Throws:
ErrnoException
-
socket
- Throws:
ErrnoException
-
socketpair
void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException- Throws:
ErrnoException
-
stat
- Throws:
ErrnoException
-
statvfs
- Throws:
ErrnoException
-
strerror
-
strsignal
-
symlink
- Throws:
ErrnoException
-
sysconf
long sysconf(int name) -
tcdrain
- Throws:
ErrnoException
-
tcsendbreak
- Throws:
ErrnoException
-
umask
int umask(int mask) -
uname
StructUtsname uname() -
unsetenv
- Throws:
ErrnoException
-
waitpid
- Throws:
ErrnoException
-
write
- Throws:
ErrnoException
-
write
- Throws:
ErrnoException
-
writev
int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException- Throws:
ErrnoException
-