152724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes/*
252724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * Copyright (C) 2011 The Android Open Source Project
352724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes *
452724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * Licensed under the Apache License, Version 2.0 (the "License");
552724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * you may not use this file except in compliance with the License.
652724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * You may obtain a copy of the License at
752724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes *
852724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes *      http://www.apache.org/licenses/LICENSE-2.0
952724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes *
1052724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * Unless required by applicable law or agreed to in writing, software
1152724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * distributed under the License is distributed on an "AS IS" BASIS,
1252724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1352724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * See the License for the specific language governing permissions and
1452724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * limitations under the License.
1552724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes */
1652724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes
1752724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughespackage libcore.io;
1852724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes
195d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.ErrnoException;
205d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.GaiException;
215d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructAddrinfo;
225744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampeimport android.system.StructCapUserData;
235744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampeimport android.system.StructCapUserHeader;
245d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructFlock;
255d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructGroupReq;
265d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructGroupSourceReq;
276d1649c5b37b21ef2b690bc0f86306e19a32db02Yi Kongimport android.system.StructIfaddrs;
285d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructLinger;
295d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructPasswd;
305d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructPollfd;
31c5307105db3c8a091a7b1a47b344bdfa8d3f54d0Narayan Kamathimport android.system.StructRlimit;
325d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructStat;
335d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructStatVfs;
345d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructTimeval;
355d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructUcred;
365d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.system.StructUtsname;
375d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.util.MutableInt;
385d930cadc8f62aee5f18e7921296fe66a54f18abElliott Hughesimport android.util.MutableLong;
3952724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughesimport java.io.FileDescriptor;
40f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fullerimport java.io.InterruptedIOException;
410a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughesimport java.net.InetAddress;
4223ec09188303a874b3b391f96ae0a29af002bff9Elliott Hughesimport java.net.InetSocketAddress;
430a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughesimport java.net.SocketAddress;
4426010ab930a2cee3bf10b9612cf070183c21228bElliott Hughesimport java.net.SocketException;
4526c7025a7a919044771fb89031161bd26fe03032Elliott Hughesimport java.nio.ByteBuffer;
4652724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes
4752724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes/**
4852724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes * Subclass this if you want to override some {@link Os} methods but otherwise delegate.
4952724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes */
5052724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughespublic class ForwardingOs implements Os {
5152724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    protected final Os os;
5252724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes
5352724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public ForwardingOs(Os os) {
5452724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes        this.os = os;
5552724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    }
5652724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes
570ab1a26ca767ae36fbbe27b62893670b208fa494Neil Fuller    public FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException { return os.accept(fd, peerAddress); }
5852724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public boolean access(String path, int mode) throws ErrnoException { return os.access(path, mode); }
593e58734d651080009c9190c7062837fca5c7cf4ePaul Jensen    public InetAddress[] android_getaddrinfo(String node, StructAddrinfo hints, int netId) throws GaiException { return os.android_getaddrinfo(node, hints, netId); }
6026010ab930a2cee3bf10b9612cf070183c21228bElliott Hughes    public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.bind(fd, address, port); }
618f5b46d72e5c1b1b1dd4357580c4fb5a60e3f4deErik Kline    public void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException { os.bind(fd, address); }
625744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe    @Override
635744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe    public StructCapUserData[] capget(StructCapUserHeader hdr) throws ErrnoException {
645744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe        return os.capget(hdr);
655744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe    }
665744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe    @Override
675744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe    public void capset(StructCapUserHeader hdr, StructCapUserData[] data) throws ErrnoException {
685744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe        os.capset(hdr, data);
695744e4a762ca12243b47dd8aed24d87d963b4d3bAndreas Gampe    }
70b7190190e0ef8de883c952efb319ce7748831faaElliott Hughes    public void chmod(String path, int mode) throws ErrnoException { os.chmod(path, mode); }
7144f7875f2985d7944c5afecc8394ad9f2219c806Elliott Hughes    public void chown(String path, int uid, int gid) throws ErrnoException { os.chown(path, uid, gid); }
72462bdac45c10f43d88d8f07f6994e272a27c14a2Elliott Hughes    public void close(FileDescriptor fd) throws ErrnoException { os.close(fd); }
7326010ab930a2cee3bf10b9612cf070183c21228bElliott Hughes    public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.connect(fd, address, port); }
748f5b46d72e5c1b1b1dd4357580c4fb5a60e3f4deErik Kline    public void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException { os.connect(fd, address); }
75396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public FileDescriptor dup(FileDescriptor oldFd) throws ErrnoException { return os.dup(oldFd); }
76396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public FileDescriptor dup2(FileDescriptor oldFd, int newFd) throws ErrnoException { return os.dup2(oldFd, newFd); }
7752724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public String[] environ() { return os.environ(); }
78798f855f67b74d481346d9dc2293ba0eedd8daf9Nick Kralevich    public void execv(String filename, String[] argv) throws ErrnoException { os.execv(filename, argv); }
79798f855f67b74d481346d9dc2293ba0eedd8daf9Nick Kralevich    public void execve(String filename, String[] argv, String[] envp) throws ErrnoException { os.execve(filename, argv, envp); }
8044f7875f2985d7944c5afecc8394ad9f2219c806Elliott Hughes    public void fchmod(FileDescriptor fd, int mode) throws ErrnoException { os.fchmod(fd, mode); }
8144f7875f2985d7944c5afecc8394ad9f2219c806Elliott Hughes    public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException { os.fchown(fd, uid, gid); }
8299a0c82619a88c6aea038757cf14090f5d33afebNeil Fuller    public int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, InterruptedIOException { return os.fcntlFlock(fd, cmd, arg); }
83c8d9ea662de6f4856b28907b4119087cfc5a44d2Narayan Kamath    public int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException { return os.fcntlInt(fd, cmd, arg); }
84c8d9ea662de6f4856b28907b4119087cfc5a44d2Narayan Kamath    public int fcntlVoid(FileDescriptor fd, int cmd) throws ErrnoException { return os.fcntlVoid(fd, cmd); }
8552724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public void fdatasync(FileDescriptor fd) throws ErrnoException { os.fdatasync(fd); }
8647cb338d43f75dd998b29caaaa9446c5705217d1Elliott Hughes    public StructStat fstat(FileDescriptor fd) throws ErrnoException { return os.fstat(fd); }
87721ceca2a52a3c27aa751476c8562e1e68088e15Elliott Hughes    public StructStatVfs fstatvfs(FileDescriptor fd) throws ErrnoException { return os.fstatvfs(fd); }
8852724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public void fsync(FileDescriptor fd) throws ErrnoException { os.fsync(fd); }
89f5333fd2094bdac4d6506177b1964b79afa64d77Elliott Hughes    public void ftruncate(FileDescriptor fd, long length) throws ErrnoException { os.ftruncate(fd, length); }
904f11ebea266eada830d507b8f011e811a8e5d7bcElliott Hughes    public String gai_strerror(int error) { return os.gai_strerror(error); }
91396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public int getegid() { return os.getegid(); }
92396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public int geteuid() { return os.geteuid(); }
93396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public int getgid() { return os.getgid(); }
9452724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public String getenv(String name) { return os.getenv(name); }
954f11ebea266eada830d507b8f011e811a8e5d7bcElliott Hughes    public String getnameinfo(InetAddress address, int flags) throws GaiException { return os.getnameinfo(address, flags); }
96482a3fc5635ac431b8a7476d7fe3397af4c2e8ecElliott Hughes    public SocketAddress getpeername(FileDescriptor fd) throws ErrnoException { return os.getpeername(fd); }
978f0f2ac7fcd8f366a78cc51181d065ab93385e46Elliott Hughes    public int getpgid(int pid) throws ErrnoException { return os.getpgid(pid); }
98396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public int getpid() { return os.getpid(); }
99396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public int getppid() { return os.getppid(); }
100d4419fce71d11ec8494525eca65e54d1aab51de6Elliott Hughes    public StructPasswd getpwnam(String name) throws ErrnoException { return os.getpwnam(name); }
101d4419fce71d11ec8494525eca65e54d1aab51de6Elliott Hughes    public StructPasswd getpwuid(int uid) throws ErrnoException { return os.getpwuid(uid); }
102c5307105db3c8a091a7b1a47b344bdfa8d3f54d0Narayan Kamath    public StructRlimit getrlimit(int resource) throws ErrnoException { return os.getrlimit(resource); }
1030a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughes    public SocketAddress getsockname(FileDescriptor fd) throws ErrnoException { return os.getsockname(fd); }
1040a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughes    public int getsockoptByte(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptByte(fd, level, option); }
1050a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughes    public InetAddress getsockoptInAddr(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptInAddr(fd, level, option); }
1060a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughes    public int getsockoptInt(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptInt(fd, level, option); }
1070a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughes    public StructLinger getsockoptLinger(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptLinger(fd, level, option); }
1080a9d1ee45a9884a9616624d747172e18734e8fe0Elliott Hughes    public StructTimeval getsockoptTimeval(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptTimeval(fd, level, option); }
109482a3fc5635ac431b8a7476d7fe3397af4c2e8ecElliott Hughes    public StructUcred getsockoptUcred(FileDescriptor fd, int level, int option) throws ErrnoException { return os.getsockoptUcred(fd, level, option); }
110069525a39125c203b658c805685b6045a7d4dfebElliott Hughes    public int gettid() { return os.gettid(); }
111396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public int getuid() { return os.getuid(); }
11240afa6bcd4652a16fe461a59f205dd0d65652118Yi Kong    public byte[] getxattr(String path, String name) throws ErrnoException { return os.getxattr(path, name); }
1136d1649c5b37b21ef2b690bc0f86306e19a32db02Yi Kong    public StructIfaddrs[] getifaddrs() throws ErrnoException { return os.getifaddrs(); }
114a37e971343883bb582a93ffbd9f0ba84f10e55baElliott Hughes    public String if_indextoname(int index) { return os.if_indextoname(index); }
1156d1649c5b37b21ef2b690bc0f86306e19a32db02Yi Kong    public int if_nametoindex(String name) { return os.if_nametoindex(name); }
116fc041ff241f9a7556e72236f130de0215ecd17dbElliott Hughes    public InetAddress inet_pton(int family, String address) { return os.inet_pton(family, address); }
11745348e170536651c0e5f8d5cb0319ba232a1b833Yi Kong    public int ioctlFlags(FileDescriptor fd, String interfaceName) throws ErrnoException { return os.ioctlFlags(fd, interfaceName); };
118a37e971343883bb582a93ffbd9f0ba84f10e55baElliott Hughes    public InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException { return os.ioctlInetAddress(fd, cmd, interfaceName); }
1198b15dcc5890963edad4dfcf558cc16027c7985e5Elliott Hughes    public int ioctlInt(FileDescriptor fd, int cmd, MutableInt arg) throws ErrnoException { return os.ioctlInt(fd, cmd, arg); }
12045348e170536651c0e5f8d5cb0319ba232a1b833Yi Kong    public int ioctlMTU(FileDescriptor fd, String interfaceName) throws ErrnoException { return os.ioctlMTU(fd, interfaceName); };
1219a3f363523000704205df288f8b6f2f48c0d8563Elliott Hughes    public boolean isatty(FileDescriptor fd) { return os.isatty(fd); }
122a5fb706fe4a6dbeaaf4cb1f8bbc2c68b0a2a3f3cElliott Hughes    public void kill(int pid, int signal) throws ErrnoException { os.kill(pid, signal); }
12344f7875f2985d7944c5afecc8394ad9f2219c806Elliott Hughes    public void lchown(String path, int uid, int gid) throws ErrnoException { os.lchown(path, uid, gid); }
12404428d61d7000e17ab21d08a1d672c34eb68f6e2Elliott Hughes    public void link(String oldPath, String newPath) throws ErrnoException { os.link(oldPath, newPath); }
125e1502d64e937001636fca3d62b2552ef2a34d05fElliott Hughes    public void listen(FileDescriptor fd, int backlog) throws ErrnoException { os.listen(fd, backlog); }
12655dd377d62cf780df94d8e0198b66e99456b6f50Yi Kong    public String[] listxattr(String path) throws ErrnoException { return os.listxattr(path); }
127dedaccdfa07c370a58cba08b096133ad9eec0ec3Elliott Hughes    public long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException { return os.lseek(fd, offset, whence); }
12847cb338d43f75dd998b29caaaa9446c5705217d1Elliott Hughes    public StructStat lstat(String path) throws ErrnoException { return os.lstat(path); }
1290f746ff511162add42eeabaf14ba70ace874c6f4Elliott Hughes    public void mincore(long address, long byteCount, byte[] vector) throws ErrnoException { os.mincore(address, byteCount, vector); }
130c7fa20701d5e9398c38f4615ed293acfce1c0cf6Elliott Hughes    public void mkdir(String path, int mode) throws ErrnoException { os.mkdir(path, mode); }
131f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public void mkfifo(String path, int mode) throws ErrnoException { os.mkfifo(path, mode); }
1327e13c0f05ac9e7c55682d10e953dd4cbd5e6107cElliott Hughes    public void mlock(long address, long byteCount) throws ErrnoException { os.mlock(address, byteCount); }
1337e25eff38a191d9c19e45093f4fde5102fb09d78Elliott Hughes    public long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException { return os.mmap(address, byteCount, prot, flags, fd, offset); }
1347e25eff38a191d9c19e45093f4fde5102fb09d78Elliott Hughes    public void msync(long address, long byteCount, int flags) throws ErrnoException { os.msync(address, byteCount, flags); }
1357e13c0f05ac9e7c55682d10e953dd4cbd5e6107cElliott Hughes    public void munlock(long address, long byteCount) throws ErrnoException { os.munlock(address, byteCount); }
1367e25eff38a191d9c19e45093f4fde5102fb09d78Elliott Hughes    public void munmap(long address, long byteCount) throws ErrnoException { os.munmap(address, byteCount); }
1370ac77ac8e915bff1a863e371f9b363033f9cf759Elliott Hughes    public FileDescriptor open(String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
1380d8b5c3692c36837d22c4e7d9c4d7d95f6a10235Elliott Hughes    public FileDescriptor[] pipe2(int flags) throws ErrnoException { return os.pipe2(flags); }
13970c820401677ca251ad09ac64cc23c760764e75dElliott Hughes    public int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException { return os.poll(fds, timeoutMs); }
14011f07d30d2e344b48f132ec6ed105d85423052c2Elliott Hughes    public void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException { os.posix_fallocate(fd, offset, length); }
1415215e4c0db7530519981f1e505e6db82401802f2Nick Kralevich    public int prctl(int option, long arg2, long arg3, long arg4, long arg5) throws ErrnoException { return os.prctl(option, arg2, arg3, arg4, arg5); };
142f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { return os.pread(fd, buffer, offset); }
143f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.pread(fd, bytes, byteOffset, byteCount, offset); }
144f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { return os.pwrite(fd, buffer, offset); }
145f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException { return os.pwrite(fd, bytes, byteOffset, byteCount, offset); }
146f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException { return os.read(fd, buffer); }
147f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return os.read(fd, bytes, byteOffset, byteCount); }
1480b6b3e10459fc3a3f4dd280dab8d4a145f7bf2f0Elliott Hughes    public String readlink(String path) throws ErrnoException { return os.readlink(path); }
1495d45c289afe04d12f41612e33e8df83e5db650d8Narayan Kamath    public String realpath(String path) throws ErrnoException { return os.realpath(path); }
150f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return os.readv(fd, buffers, offsets, byteCounts); }
15126010ab930a2cee3bf10b9612cf070183c21228bElliott Hughes    public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { return os.recvfrom(fd, buffer, flags, srcAddress); }
15226010ab930a2cee3bf10b9612cf070183c21228bElliott Hughes    public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { return os.recvfrom(fd, bytes, byteOffset, byteCount, flags, srcAddress); }
153c7fa20701d5e9398c38f4615ed293acfce1c0cf6Elliott Hughes    public void remove(String path) throws ErrnoException { os.remove(path); }
15490246a0ae7117d780e077c9e84cdb73ff5b44af7Jeff Sharkey    public void removexattr(String path, String name) throws ErrnoException { os.removexattr(path, name); }
155a20cc6fca30d18e05db67ceeb0403b7b58ffd364Elliott Hughes    public void rename(String oldPath, String newPath) throws ErrnoException { os.rename(oldPath, newPath); }
1568b15dcc5890963edad4dfcf558cc16027c7985e5Elliott Hughes    public long sendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount) throws ErrnoException { return os.sendfile(outFd, inFd, inOffset, byteCount); }
15726010ab930a2cee3bf10b9612cf070183c21228bElliott Hughes    public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, buffer, flags, inetAddress, port); }
15826010ab930a2cee3bf10b9612cf070183c21228bElliott Hughes    public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port); }
159a8b7587c5001db3489c64ac1d16c254a683f76bdLorenzo Colitti    public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, SocketAddress address) throws ErrnoException, SocketException { return os.sendto(fd, bytes, byteOffset, byteCount, flags, address); }
160396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public void setegid(int egid) throws ErrnoException { os.setegid(egid); }
161895a613aa2aec6aa6d03b29755cf2fea584909adElliott Hughes    public void setenv(String name, String value, boolean overwrite) throws ErrnoException { os.setenv(name, value, overwrite); }
162396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public void seteuid(int euid) throws ErrnoException { os.seteuid(euid); }
163396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public void setgid(int gid) throws ErrnoException { os.setgid(gid); }
1648f0f2ac7fcd8f366a78cc51181d065ab93385e46Elliott Hughes    public void setpgid(int pid, int pgid) throws ErrnoException { os.setpgid(pid, pgid); }
1658f0f2ac7fcd8f366a78cc51181d065ab93385e46Elliott Hughes    public void setregid(int rgid, int egid) throws ErrnoException { os.setregid(rgid, egid); }
1669a6d7a1528e9f9bd8025fe4f2ae4f6d144045e95Torne (Richard Coles)    public void setreuid(int ruid, int euid) throws ErrnoException { os.setreuid(ruid, euid); }
1676c9b5377550a9649ed1532d1fcdfeba116c74eadElliott Hughes    public int setsid() throws ErrnoException { return os.setsid(); }
168c63f0d4e80a9fd3bdf99cd438d108b750226736aElliott Hughes    public void setsockoptByte(FileDescriptor fd, int level, int option, int value) throws ErrnoException { os.setsockoptByte(fd, level, option, value); }
169b974666d79ebc392b37ec1ae83aae57ae6331c08Elliott Hughes    public void setsockoptIfreq(FileDescriptor fd, int level, int option, String value) throws ErrnoException { os.setsockoptIfreq(fd, level, option, value); }
170454a95f6a28855aa3c88d168b15a45bf315efc99Elliott Hughes    public void setsockoptInt(FileDescriptor fd, int level, int option, int value) throws ErrnoException { os.setsockoptInt(fd, level, option, value); }
171b974666d79ebc392b37ec1ae83aae57ae6331c08Elliott Hughes    public void setsockoptIpMreqn(FileDescriptor fd, int level, int option, int value) throws ErrnoException { os.setsockoptIpMreqn(fd, level, option, value); }
172438cb9e440d250c8aa5daf4fae0c400dce8b1499Elliott Hughes    public void setsockoptGroupReq(FileDescriptor fd, int level, int option, StructGroupReq value) throws ErrnoException { os.setsockoptGroupReq(fd, level, option, value); }
173df29508a7aa622f265aaebdc472eb7d679185ebbNeil Fuller    public void setsockoptGroupSourceReq(FileDescriptor fd, int level, int option, StructGroupSourceReq value) throws ErrnoException { os.setsockoptGroupSourceReq(fd, level, option, value); }
174c63f0d4e80a9fd3bdf99cd438d108b750226736aElliott Hughes    public void setsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value) throws ErrnoException { os.setsockoptLinger(fd, level, option, value); }
175c63f0d4e80a9fd3bdf99cd438d108b750226736aElliott Hughes    public void setsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value) throws ErrnoException { os.setsockoptTimeval(fd, level, option, value); }
176396a9c666da353b910b515d12eb1c43adfddb0c8Elliott Hughes    public void setuid(int uid) throws ErrnoException { os.setuid(uid); }
17790246a0ae7117d780e077c9e84cdb73ff5b44af7Jeff Sharkey    public void setxattr(String path, String name, byte[] value, int flags) throws ErrnoException { os.setxattr(path, name, value, flags); }
17859e4744d27231f260271dbbca406e0cc39768116Elliott Hughes    public void shutdown(FileDescriptor fd, int how) throws ErrnoException { os.shutdown(fd, how); }
179454a95f6a28855aa3c88d168b15a45bf315efc99Elliott Hughes    public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException { return os.socket(domain, type, protocol); }
1803218082325b6b8713a8ac15731482e3da86a7df9Elliott Hughes    public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException { os.socketpair(domain, type, protocol, fd1, fd2); }
18147cb338d43f75dd998b29caaaa9446c5705217d1Elliott Hughes    public StructStat stat(String path) throws ErrnoException { return os.stat(path); }
182721ceca2a52a3c27aa751476c8562e1e68088e15Elliott Hughes    public StructStatVfs statvfs(String path) throws ErrnoException { return os.statvfs(path); }
18352724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes    public String strerror(int errno) { return os.strerror(errno); }
184763f8ed6195707d0c30bfae1ca8a3bb886b746ccElliott Hughes    public String strsignal(int signal) { return os.strsignal(signal); }
185a20cc6fca30d18e05db67ceeb0403b7b58ffd364Elliott Hughes    public void symlink(String oldPath, String newPath) throws ErrnoException { os.symlink(oldPath, newPath); }
1866fc1a0e1e68dc2e0d12341548e58fa7f1c5dafc4Elliott Hughes    public long sysconf(int name) { return os.sysconf(name); }
187bb5816aa1626eb2f6263bd21479600b114c8a1bdJohan Redestig    public void tcdrain(FileDescriptor fd) throws ErrnoException { os.tcdrain(fd); }
188039f7599559fd7e48c354b99dcb94ff391f53349Elliott Hughes    public void tcsendbreak(FileDescriptor fd, int duration) throws ErrnoException { os.tcsendbreak(fd, duration); }
18944f7875f2985d7944c5afecc8394ad9f2219c806Elliott Hughes    public int umask(int mask) { return os.umask(mask); }
1909b510df35b57946d843ffc34cf23fdcfc84c5220Elliott Hughes    public StructUtsname uname() { return os.uname(); }
1915e8f82f2592498e75ac4685ccd0d31d601d37bdcNeil Fuller    public void unlink(String pathname) throws ErrnoException { os.unlink(pathname); }
192895a613aa2aec6aa6d03b29755cf2fea584909adElliott Hughes    public void unsetenv(String name) throws ErrnoException { os.unsetenv(name); }
1939e67ca71d3d4a489a157abadc5ba519ced7a0b50Elliott Hughes    public int waitpid(int pid, MutableInt status, int options) throws ErrnoException { return os.waitpid(pid, status, options); }
194f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int write(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException { return os.write(fd, buffer); }
195f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException { return os.write(fd, bytes, byteOffset, byteCount); }
196f0d40d662d9dfdb04215c718961765837d2cf00cNeil Fuller    public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return os.writev(fd, buffers, offsets, byteCounts); }
19752724d3ebd4ccaaa4b9f5576e329d4272cde8ea9Elliott Hughes}
198