Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 187) sorted by relevance

12345678

/libcore/luni/src/main/java/android/system/
DOs.java43 …or accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException… in accept() argument
55 …tic void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketExcep… in bind() argument
57 … static void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException… in bind() argument
72 public static void close(FileDescriptor fd) throws ErrnoException { Libcore.os.close(fd); } in close() argument
77 …void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketExcept… in connect() argument
79 …tic void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException … in connect() argument
109 …public static void fchmod(FileDescriptor fd, int mode) throws ErrnoException { Libcore.os.fchmod(f… in fchmod() argument
114 …public static void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException { Libcore.os.… in fchown() argument
116 …lFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, InterruptedIOException … in fcntlFlock() argument
117 …lic static int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException { return Libcor… in fcntlInt() argument
[all …]
/libcore/luni/src/main/java/libcore/io/
DForwardingOs.java53 …riptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketExcep… in accept() argument
56 …public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketEx… in bind() argument
57 …public void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException … in bind() argument
60 public void close(FileDescriptor fd) throws ErrnoException { os.close(fd); } in close() argument
61 …lic void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketEx… in connect() argument
62 …public void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketExcepti… in connect() argument
68 public void fchmod(FileDescriptor fd, int mode) throws ErrnoException { os.fchmod(fd, mode); } in fchmod() argument
69 …public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException { os.fchown(fd, uid,… in fchown() argument
70 …fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, InterruptedIOExcept… in fcntlFlock() argument
71 …public int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException { return os.fcntlIn… in fcntlInt() argument
[all …]
DPosix.java47 …public native FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws Errno… in accept() argument
50 …public native void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, S… in bind() argument
51 …public native void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketExc… in bind() argument
54 public native void close(FileDescriptor fd) throws ErrnoException; in close() argument
55 …public native void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException… in connect() argument
56 …public native void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, Socket… in connect() argument
62 public native void fchmod(FileDescriptor fd, int mode) throws ErrnoException; in fchmod() argument
63 public native void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException; in fchown() argument
64 …public native int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, I… in fcntlFlock() argument
65 public native int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException; in fcntlInt() argument
[all …]
DIoBridge.java55 public static int available(FileDescriptor fd) throws IOException { in available() argument
58 Libcore.os.ioctlInt(fd, FIONREAD, available); in available()
79 … public static void bind(FileDescriptor fd, InetAddress address, int port) throws SocketException { in bind() argument
97 Libcore.os.bind(fd, address, port); in bind()
108 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketExce… in connect() argument
110 IoBridge.connect(fd, inetAddress, port, 0); in connect()
120 …public static void connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) th… in connect() argument
122 connectErrno(fd, inetAddress, port, timeoutMs); in connect()
134 …private static void connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, int timeout… in connectErrno() argument
137 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
[all …]
DBlockGuardOs.java44 private FileDescriptor tagSocket(FileDescriptor fd) throws ErrnoException { in tagSocket() argument
46 SocketTagger.get().tag(fd); in tagSocket()
47 return fd; in tagSocket()
53 private void untagSocket(FileDescriptor fd) throws ErrnoException { in untagSocket() argument
55 SocketTagger.get().untag(fd); in untagSocket()
61 …@Override public FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws Er… in accept() argument
63 return tagSocket(os.accept(fd, peerAddress)); in accept()
81 @Override public void close(FileDescriptor fd) throws ErrnoException { in close() argument
86 if (fd.isSocket$()) { in close()
87 if (isLingerSocket(fd)) { in close()
[all …]
DOs.java44 …public FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoExcepti… in accept() argument
47 …public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketEx… in bind() argument
48 … public void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException; in bind() argument
51 public void close(FileDescriptor fd) throws ErrnoException; in close() argument
52 …public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, Socke… in connect() argument
53 …public void connect(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketExcepti… in connect() argument
59 public void fchmod(FileDescriptor fd, int mode) throws ErrnoException; in fchmod() argument
60 public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException; in fchown() argument
61 …public int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException, Interrup… in fcntlFlock() argument
62 public int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException; in fcntlInt() argument
[all …]
DIoUtils.java40 public static void close(FileDescriptor fd) throws IOException { in close() argument
42 if (fd != null && fd.valid()) { in close()
43 Libcore.os.close(fd); in close()
67 public static void closeQuietly(FileDescriptor fd) { in closeQuietly() argument
69 IoUtils.close(fd); in closeQuietly()
89 public static void setBlocking(FileDescriptor fd, boolean blocking) throws IOException { in setBlocking() argument
91 int flags = Libcore.os.fcntlVoid(fd, F_GETFL); in setBlocking()
97 Libcore.os.fcntlInt(fd, F_SETFL, flags); in setBlocking()
163 FileDescriptor fd = Libcore.os.open(path, O_RDONLY, 0); in canOpenReadOnly() local
164 Libcore.os.close(fd); in canOpenReadOnly()
[all …]
DMemoryMappedFile.java51 FileDescriptor fd = Libcore.os.open(path, O_RDONLY, 0); in mmapRO() local
52 long size = Libcore.os.fstat(fd).st_size; in mmapRO()
53 long address = Libcore.os.mmap(0L, size, PROT_READ, MAP_SHARED, fd, 0); in mmapRO()
54 Libcore.os.close(fd); in mmapRO()
/libcore/luni/src/main/java/java/io/
DFileInputStream.java56 private FileDescriptor fd; field in FileInputStream
76 this.fd = IoBridge.open(file.getPath(), O_RDONLY); in FileInputStream()
89 public FileInputStream(FileDescriptor fd) { in FileInputStream() argument
90 if (fd == null) { in FileInputStream()
93 this.fd = fd; in FileInputStream()
108 return IoBridge.available(fd); in available()
119 IoBridge.closeAndSignalBlockedThreads(fd); in close()
123 fd = new FileDescriptor(); in close()
159 channel = NioUtils.newFileChannel(this, fd, O_RDONLY); in getChannel()
169 return fd; in getFD()
[all …]
DFileOutputStream.java54 private FileDescriptor fd; field in FileOutputStream
87 this.fd = IoBridge.open(file.getPath(), mode); in FileOutputStream()
97 public FileOutputStream(FileDescriptor fd) { in FileOutputStream() argument
98 if (fd == null) { in FileOutputStream()
101 this.fd = fd; in FileOutputStream()
104 this.channel = NioUtils.newFileChannel(this, fd, mode); in FileOutputStream()
138 IoBridge.closeAndSignalBlockedThreads(fd); in close()
142 fd = new FileDescriptor(); in close()
171 channel = NioUtils.newFileChannel(this, fd, mode); in getChannel()
181 return fd; in getFD()
[all …]
DRandomAccessFile.java45 private FileDescriptor fd; field in RandomAccessFile
117 this.fd = IoBridge.open(file.getPath(), flags); in RandomAccessFile()
122 fd.sync(); in RandomAccessFile()
164 IoBridge.closeAndSignalBlockedThreads(fd); in close()
195 channel = NioUtils.newFileChannel(this, fd, mode); in getChannel()
210 return fd; in getFD()
225 return Libcore.os.lseek(fd, 0L, SEEK_CUR); in getFilePointer()
240 return Libcore.os.fstat(fd).st_size; in length()
289 return IoBridge.read(fd, buffer, byteOffset, byteCount); in read()
603 Libcore.os.lseek(fd, offset, SEEK_SET); in seek()
[all …]
DFileDescriptor.java104 public final void setInt$(int fd) { in setInt$() argument
105 this.descriptor = fd; in setInt$()
115 private static native boolean isSocket(int fd); in isSocket() argument
DFileReader.java53 public FileReader(FileDescriptor fd) { in FileReader() argument
54 super(new FileInputStream(fd)); in FileReader()
/libcore/luni/src/main/java/java/nio/
DPipeImpl.java61 private final FileDescriptor fd; field in PipeImpl.PipeSourceChannel
64 …private PipeSourceChannel(SelectorProvider selectorProvider, FileDescriptor fd) throws IOException… in PipeSourceChannel() argument
66 this.fd = fd; in PipeSourceChannel()
67 this.channel = new SocketChannelImpl(selectorProvider, fd); in PipeSourceChannel()
91 return fd; in getFD()
96 private final FileDescriptor fd; field in PipeImpl.PipeSinkChannel
99 … private PipeSinkChannel(SelectorProvider selectorProvider, FileDescriptor fd) throws IOException { in PipeSinkChannel() argument
101 this.fd = fd; in PipeSinkChannel()
102 this.channel = new SocketChannelImpl(selectorProvider, fd); in PipeSinkChannel()
126 return fd; in getFD()
DFileChannelImpl.java56 private final FileDescriptor fd; field in FileChannelImpl
66 public FileChannelImpl(Closeable ioObject, FileDescriptor fd, int mode) { in FileChannelImpl() argument
67 this.fd = fd; in FileChannelImpl()
121 success = (Libcore.os.fcntlFlock(fd, wait ? F_SETLKW64 : F_SETLK64, flock) != -1); in basicLock()
197 Libcore.os.fcntlFlock(fd, F_SETLKW64, flock); in release()
210 Libcore.os.fsync(fd); in force()
212 Libcore.os.fdatasync(fd); in force()
240 Libcore.os.ftruncate(fd, position + size); in map()
247 … if (S_ISREG(Libcore.os.fstat(fd).st_mode) || ftruncateException.errno != EINVAL) { in map()
257 MemoryBlock block = MemoryBlock.mmap(fd, alignment, size + offset, mapMode); in map()
[all …]
DDatagramChannelImpl.java55 private final FileDescriptor fd; field in DatagramChannelImpl
83 fd = IoBridge.socket(false); in DatagramChannelImpl()
92 fd = new FileDescriptor(); in DatagramChannelImpl()
103 socket = new DatagramSocketAdapter(new PlainDatagramSocketImpl(fd, localPort), this); in socket()
120 sa = Libcore.os.getsockname(fd); in onBind()
153 IoBridge.connect(fd, remoteAddress, remotePort); in connect()
194 Libcore.os.connect(fd, InetAddress.UNSPECIFIED, 0); in disconnect()
257 …received = IoBridge.recvfrom(false, fd, receivePacket.getData(), receivePacket.getOffset(), receiv… in receiveImpl()
278 IoBridge.recvfrom(false, fd, target, 0, receivePacket, isConnected()); in receiveDirectImpl()
306 sendCount = IoBridge.sendto(fd, source, 0, isa.getAddress(), isa.getPort()); in send()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileDescriptorTest.java43 FileDescriptor fd = fos.getFD(); in test_sync() local
44 fd.sync(); in test_sync()
50 fd = fis.getFD(); in test_sync()
51 fd.sync(); in test_sync()
55 fd = raf.getFD(); in test_sync()
56 fd.sync(); in test_sync()
79 FileDescriptor fd = fos.getFD(); in test_valid() local
80 assertTrue(fd.valid()); in test_valid()
82 assertFalse(fd.valid()); in test_valid()
/libcore/luni/src/main/java/java/net/
DPlainSocketImpl.java53 public PlainSocketImpl(FileDescriptor fd) { in PlainSocketImpl() argument
54 this.fd = fd; in PlainSocketImpl()
55 if (fd.valid()) { in PlainSocketImpl()
69 public PlainSocketImpl(FileDescriptor fd, int localport, InetAddress addr, int port) { in PlainSocketImpl() argument
70 this.fd = fd; in PlainSocketImpl()
74 if (fd.valid()) { in PlainSocketImpl()
89 FileDescriptor clientFd = Libcore.os.accept(fd, peerAddress); in accept()
93 newImpl.fd.setInt$(clientFd.getInt$()); in accept()
107 newImpl.localport = IoBridge.getSocketLocalPort(newImpl.fd); in accept()
115 if (!fd.valid()) { in checkNotClosed()
[all …]
DPlainDatagramSocketImpl.java47 public PlainDatagramSocketImpl(FileDescriptor fd, int localPort) { in PlainDatagramSocketImpl() argument
48 this.fd = fd; in PlainDatagramSocketImpl()
50 if (fd.valid()) { in PlainDatagramSocketImpl()
56 fd = new FileDescriptor(); in PlainDatagramSocketImpl()
60 IoBridge.bind(fd, address, port); in bind()
64 localPort = IoBridge.getSocketLocalPort(fd); in bind()
81 IoBridge.closeAndSignalBlockedThreads(fd); in close()
93 this.fd = IoBridge.socket(false); in create()
108 return IoBridge.getSocketOption(fd, option); in getOption()
163 …IoBridge.recvfrom(false, fd, pack.getData(), pack.getOffset(), pack.getLength(), flags, pack, isNa… in doRecv()
[all …]
/libcore/luni/src/test/java/libcore/io/
DOsTest.java138 …private void checkSockName(FileDescriptor fd, boolean isAbstract, InetAddress address) throws Exce… in checkSockName() argument
139 InetSocketAddress isa = (InetSocketAddress) Libcore.os.getsockname(fd); in checkSockName()
152 private void checkNoPeerName(FileDescriptor fd) throws Exception { in checkNoPeerName() argument
153 checkNoName(Libcore.os.getpeername(fd)); in checkNoPeerName()
156 private void checkNoSockName(FileDescriptor fd) throws Exception { in checkNoSockName() argument
157 checkNoName(Libcore.os.getsockname(fd)); in checkNoSockName()
167 FileDescriptor fd = fos.getFD(); in test_byteBufferPositions_write_pwrite() local
172 int written = Libcore.os.write(fd, byteBuffer); in test_byteBufferPositions_write_pwrite()
177 written = Libcore.os.write(fd, byteBuffer); in test_byteBufferPositions_write_pwrite()
182 written = Libcore.os.pwrite(fd, byteBuffer, 64 /* offset */); in test_byteBufferPositions_write_pwrite()
[all …]
/libcore/luni/src/main/java/java/lang/
DProcessManager.java345 private FileDescriptor fd; field in ProcessManager.ProcessInputStream
347 private ProcessInputStream(FileDescriptor fd) { in ProcessInputStream() argument
348 super(fd); in ProcessInputStream()
349 this.fd = fd; in ProcessInputStream()
359 IoUtils.close(fd); in close()
361 fd = null; in close()
371 private FileDescriptor fd; field in ProcessManager.ProcessOutputStream
373 private ProcessOutputStream(FileDescriptor fd) { in ProcessOutputStream() argument
374 super(fd); in ProcessOutputStream()
375 this.fd = fd; in ProcessOutputStream()
[all …]
/libcore/luni/src/main/native/
Djava_lang_ProcessManager.cpp59 int fd = strtol(e->d_name, &end, 10); in CloseNonStandardFds() local
61 if (fd > STDERR_FILENO && fd != dir_fd && fd != status_pipe_fd && fd != properties_fd) { in CloseNonStandardFds()
62 close(fd); in CloseNonStandardFds()
73 int fd = pipes[i]; in ClosePipes() local
74 if (fd != -1 && fd != skip_fd) { in ClosePipes()
DAsynchronousCloseMonitor.cpp65 void AsynchronousCloseMonitor::signalBlockedThreads(int fd) { in signalBlockedThreads() argument
68 if (it->mFd == fd) { in signalBlockedThreads()
80 AsynchronousCloseMonitor::AsynchronousCloseMonitor(int fd) { in AsynchronousCloseMonitor() argument
84 mFd = fd; in AsynchronousCloseMonitor()
Dlibcore_io_Posix.cpp571 int fd = jniGetFDFromFileDescriptor(env, javaFd); in doGetSockName() local
576 int rc = is_sockname ? TEMP_FAILURE_RETRY(getsockname(fd, sa, &byteCount)) in doGetSockName()
577 : TEMP_FAILURE_RETRY(getpeername(fd, sa, &byteCount)); in doGetSockName()
684 int fd = jniGetFDFromFileDescriptor(env, javaFd); in Posix_close() local
690 throwIfMinusOne(env, "close", close(fd)); in Posix_close()
718 int fd = throwIfMinusOne(env, "dup2", TEMP_FAILURE_RETRY(dup2(oldFd, newFd))); in Posix_dup2() local
719 return (fd != -1) ? jniCreateFileDescriptor(env, fd) : NULL; in Posix_dup2()
753 int fd = jniGetFDFromFileDescriptor(env, javaFd); in Posix_fchmod() local
754 throwIfMinusOne(env, "fchmod", TEMP_FAILURE_RETRY(fchmod(fd, mode))); in Posix_fchmod()
758 int fd = jniGetFDFromFileDescriptor(env, javaFd); in Posix_fchown() local
[all …]
DAsynchronousCloseMonitor.h46 AsynchronousCloseMonitor(int fd);
52 static void signalBlockedThreads(int fd);

12345678