Lines Matching refs:fd

32     public native FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException;
34 public native void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException;
37 public native void close(FileDescriptor fd) throws ErrnoException;
38 public native void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException;
42 public native void fchmod(FileDescriptor fd, int mode) throws ErrnoException;
43 public native void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException;
44 public native int fcntlVoid(FileDescriptor fd, int cmd) throws ErrnoException;
45 public native int fcntlLong(FileDescriptor fd, int cmd, long arg) throws ErrnoException;
46 public native int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException;
47 public native void fdatasync(FileDescriptor fd) throws ErrnoException;
48 public native StructStat fstat(FileDescriptor fd) throws ErrnoException;
49 public native StructStatFs fstatfs(FileDescriptor fd) throws ErrnoException;
50 public native void fsync(FileDescriptor fd) throws ErrnoException;
51 public native void ftruncate(FileDescriptor fd, long length) throws ErrnoException;
63 public native SocketAddress getsockname(FileDescriptor fd) throws ErrnoException;
64 public native int getsockoptByte(FileDescriptor fd, int level, int option) throws ErrnoException;
65 public native InetAddress getsockoptInAddr(FileDescriptor fd, int level, int option) throws ErrnoException;
66 public native int getsockoptInt(FileDescriptor fd, int level, int option) throws ErrnoException;
67 public native StructLinger getsockoptLinger(FileDescriptor fd, int level, int option) throws ErrnoException;
68 public native StructTimeval getsockoptTimeval(FileDescriptor fd, int level, int option) throws ErrnoException;
72 public native InetAddress ioctlInetAddress(FileDescriptor fd, int cmd, String interfaceName) throws ErrnoException;
73 public native int ioctlInt(FileDescriptor fd, int cmd, MutableInt arg) throws ErrnoException;
74 public native boolean isatty(FileDescriptor fd);
77 public native void listen(FileDescriptor fd, int backlog) throws ErrnoException;
78 public native long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException;
83 public native long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException;
90 public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException {
92 return preadBytes(fd, buffer, buffer.position(), buffer.remaining(), offset);
94 return preadBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining(), offset);
97 public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException {
99 return preadBytes(fd, bytes, byteOffset, byteCount, offset);
101 private native int preadBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, long offset) throws ErrnoException;
102 public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException {
104 return pwriteBytes(fd, buffer, buffer.position(), buffer.remaining(), offset);
106 return pwriteBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining(), offset);
109 public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException {
111 return pwriteBytes(fd, bytes, byteOffset, byteCount, offset);
113 private native int pwriteBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, long offset) throws ErrnoException;
114 public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException {
116 return readBytes(fd, buffer, buffer.position(), buffer.remaining());
118 return readBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining());
121 public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException {
123 return readBytes(fd, bytes, byteOffset, byteCount);
125 private native int readBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) throws ErrnoException;
126 public native int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException;
127 public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException {
129 return recvfromBytes(fd, buffer, buffer.position(), buffer.remaining(), flags, srcAddress);
131 return recvfromBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining(), flags, srcAddress);
134 public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException {
136 return recvfromBytes(fd, bytes, byteOffset, byteCount, flags, srcAddress);
138 private native int recvfromBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException;
142 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException {
144 return sendtoBytes(fd, buffer, buffer.position(), buffer.remaining(), flags, inetAddress, port);
146 return sendtoBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining(), flags, inetAddress, port);
149 public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException {
151 return sendtoBytes(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
153 private native int sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException;
158 public native void setsockoptByte(FileDescriptor fd, int level, int option, int value) throws ErrnoException;
159 public native void setsockoptIfreq(FileDescriptor fd, int level, int option, String value) throws ErrnoException;
160 public native void setsockoptInt(FileDescriptor fd, int level, int option, int value) throws ErrnoException;
161 public native void setsockoptIpMreqn(FileDescriptor fd, int level, int option, int value) throws ErrnoException;
162 public native void setsockoptGroupReq(FileDescriptor fd, int level, int option, StructGroupReq value) throws ErrnoException;
163 public native void setsockoptLinger(FileDescriptor fd, int level, int option, StructLinger value) throws ErrnoException;
164 public native void setsockoptTimeval(FileDescriptor fd, int level, int option, StructTimeval value) throws ErrnoException;
166 public native void shutdown(FileDescriptor fd, int how) throws ErrnoException;
174 public native void tcdrain(FileDescriptor fd) throws ErrnoException;
178 public int write(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException {
180 return writeBytes(fd, buffer, buffer.position(), buffer.remaining());
182 return writeBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + buffer.position(), buffer.remaining());
185 public int write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException {
187 return writeBytes(fd, bytes, byteOffset, byteCount);
189 private native int writeBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) throws ErrnoException;
190 public native int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException;