/libcore/ojluni/src/main/java/java/nio/channels/ |
D | FileLock.java | 118 private final Channel channel; field in FileLock 144 protected FileLock(FileChannel channel, in FileLock() argument 153 this.channel = channel; in FileLock() 168 public final FileChannel channel() { in channel() method in FileLock 169 return (channel instanceof FileChannel) ? (FileChannel)channel : null; in channel() 180 return channel; in acquiredBy()
|
D | SelectionKey.java | 126 public abstract SelectableChannel channel(); in channel() method in SelectionKey
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | SelectionKeyImpl.java | 41 final SelChImpl channel; // package-private field in SelectionKeyImpl 51 channel = ch; in SelectionKeyImpl() 55 public SelectableChannel channel() { in channel() method in SelectionKeyImpl 56 return (SelectableChannel)channel; in channel() 103 if ((ops & ~channel().validOps()) != 0) in nioInterestOps() 105 channel.translateAndSetInterestOps(ops, this); in nioInterestOps()
|
D | DevPollSelectorImpl.java | 116 if (ski.channel.translateAndSetReadyOps(rOps, ski)) { in updateSelectedKeys() 120 ski.channel.translateAndSetReadyOps(rOps, ski); in updateSelectedKeys() 153 SelectableChannel selch = ski.channel(); in implClose() 163 int fd = IOUtil.fdVal(ski.channel.getFD()); in implRegister() 171 int fd = ski.channel.getFDVal(); in implDereg() 178 SelectableChannel selch = ski.channel(); in implDereg() 186 int fd = IOUtil.fdVal(sk.channel.getFD()); in putEventOps()
|
D | EPollSelectorImpl.java | 111 if (ski.channel.translateAndSetReadyOps(rOps, ski)) { in updateSelectedKeys() 115 ski.channel.translateAndSetReadyOps(rOps, ski); in updateSelectedKeys() 148 SelectableChannel selch = ski.channel(); in implClose() 161 SelChImpl ch = ski.channel; in implRegister() 170 SelChImpl ch = ski.channel; in implDereg() 178 SelectableChannel selch = ski.channel(); in implDereg() 186 SelChImpl ch = ski.channel; in putEventOps()
|
D | FileLockTable.java | 43 public static FileLockTable newSharedFileLockTable(Channel channel, in newSharedFileLockTable() argument 47 return new SharedFileLockTable(channel, fd); in newSharedFileLockTable() 113 private final Channel channel; field in SharedFileLockTable 118 SharedFileLockTable(Channel channel, FileDescriptor fd) throws IOException { in SharedFileLockTable() argument 119 this.channel = channel; in SharedFileLockTable() 187 assert (lock != null) && (lock.acquiredBy() == channel); in remove() 209 if (lock != null && lock.acquiredBy() == channel) { in removeAll()
|
D | InheritedChannel.java | 201 private static Channel channel = null; field in InheritedChannel 214 channel = createChannel(); in getChannel() 220 if (channel != null) { in getChannel() 221 checkAccess(channel); in getChannel() 223 return channel; in getChannel()
|
D | AbstractPollSelectorImpl.java | 96 SelectableChannel selch = channelArray[i].channel(); in implClose() 125 if (sk.channel.translateAndSetReadyOps(rOps, sk)) { in updateSelectedKeys() 129 sk.channel.translateAndSetReadyOps(rOps, sk); in updateSelectedKeys() 159 pollWrapper.addEntry(ski.channel); in implRegister() 192 SelectableChannel selch = ski.channel(); in implDereg()
|
D | FileLockImpl.java | 36 FileLockImpl(FileChannel channel, long position, long size, boolean shared) in FileLockImpl() argument 38 super(channel, position, size, shared); in FileLockImpl()
|
/libcore/ojluni/src/main/java/java/io/ |
D | FileInputStream.java | 63 private FileChannel channel = null; field in FileInputStream 350 if (channel != null) { in close() 356 channel.close(); in close() 397 if (channel == null) { in getChannel() 398 channel = FileChannelImpl.open(fd, path, true, false, this); in getChannel() 401 return channel; in getChannel()
|
D | FileOutputStream.java | 78 private FileChannel channel; field in FileOutputStream 346 if (channel != null) { in close() 352 channel.close(); in close() 395 if (channel == null) { in getChannel() 396 channel = FileChannelImpl.open(fd, path, false, true, append, this); in getChannel() 398 return channel; in getChannel()
|
D | RandomAccessFile.java | 74 private FileChannel channel = null; field in RandomAccessFile 291 if (channel == null) { in getChannel() 292 channel = FileChannelImpl.open(fd, path, true, rw, this); in getChannel() 294 return channel; in getChannel() 628 if (channel != null && channel.isOpen()) { in close() 629 channel.close(); in close()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | DatagramChannelTest.java | 189 DatagramChannel channel = DatagramChannel.open(); in test_bind() local 190 channel.bind(socketAddress); in test_bind() 192 ((InetSocketAddress)(channel.getLocalAddress())).getAddress()); in test_bind() 193 assertTrue(((InetSocketAddress)(channel.getLocalAddress())).getPort() > 0); in test_bind() 196 channel.bind(socketAddress); in test_bind() 202 ((InetSocketAddress)(channel.getLocalAddress())).getPort()); in test_bind() 208 channel.close(); in test_bind() 211 channel.bind(socketAddress); in test_bind() 231 DatagramChannel channel = DatagramChannel.open(StandardProtocolFamily.INET); in test_open$java_net_ProtocolFamily() local 233 channel.bind(new InetSocketAddress(Inet4Address.LOOPBACK, 0)); in test_open$java_net_ProtocolFamily() [all …]
|
D | OldServerSocketChannelTest.java | 66 ServerSocketChannel channel = in testConstructor() local 68 assertNotNull(channel); in testConstructor() 69 assertSame(SelectorProvider.provider(),channel.provider()); in testConstructor()
|
D | FileIOInterruptTest.java | 538 private final FileChannel channel; field in FileIOInterruptTest.ChannelReader 544 ChannelReader(FileChannel channel, Method method) { in ChannelReader() argument 545 this.channel = channel; in ChannelReader() 555 channel.read(buffer); in run() 558 channel.read(new ByteBuffer[] { buffer, buffer2 }); in run() 583 private final FileChannel channel; field in FileIOInterruptTest.ChannelWriter 589 ChannelWriter(FileChannel channel, Method method) { in ChannelWriter() argument 590 this.channel = channel; in ChannelWriter() 606 bytesWritten += channel.write(buffer1); in run() 608 bytesWritten += channel.write(new ByteBuffer[]{ buffer1, buffer2 }); in run()
|
D | OldSocketChannelTest.java | 92 SocketChannel channel = in testConstructor() local 94 assertNotNull(channel); in testConstructor() 95 assertSame(SelectorProvider.provider(), channel.provider()); in testConstructor() 96 channel = SocketChannel.open(); in testConstructor() 97 assertNotNull(channel); in testConstructor() 98 assertSame(SelectorProvider.provider(), channel.provider()); in testConstructor()
|
D | OldFileChannelTest.java | 503 private void doTestForIOOBException(FileChannel channel, in doTestForIOOBException() argument 506 channel.read(buffer, -1, 0); in doTestForIOOBException() 512 channel.read(buffer, 0, -1); in doTestForIOOBException() 518 channel.read(buffer, 0, 3); in doTestForIOOBException() 524 channel.read(buffer, 1, 2); in doTestForIOOBException() 530 channel.read(buffer, 2, 1); in doTestForIOOBException() 536 channel.read(buffer, 3, 0); in doTestForIOOBException() 645 FileChannel channel = out.getChannel(); in test_isOpen() local 647 assertTrue("Assert 0: Channel is not open", channel.isOpen()); in test_isOpen() 649 assertFalse("Assert 0: Channel is still open", channel.isOpen()); in test_isOpen()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | FileLockTest.java | 42 protected MockFileLock(FileChannel channel, long position, long size, in MockFileLock() argument 44 super(channel, position, size, shared); in MockFileLock() 77 assertNull(fileLock1.channel()); in test_Constructor_Ljava_nio_channels_FileChannelJJZ() 104 assertSame(readWriteChannel, mockLock.channel()); in test_channel() 106 assertNull(lock.channel()); in test_channel()
|
D | SelectionKeyTest.java | 69 public SelectableChannel channel() { in channel() method in SelectionKeyTest.MockSelectionKey 127 assertSame(sc, selectionKey.channel()); in test_channel() 130 assertSame(sc, selectionKey.channel()); in test_channel()
|
D | SelectorTest.java | 440 SocketChannel channel = null; 442 channel = SocketChannel.open(); 443 channel.configureBlocking(false); 445 channel.register(selector, SelectionKey.OP_CONNECT); 446 channel.connect(localAddress); 447 channel.finishConnect(); 451 channel.close();
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | InterruptedStreamTest.java | 142 private void testInterruptReadableChannel(final ReadableByteChannel channel) throws Exception { in testInterruptReadableChannel() argument 145 channel.read(ByteBuffer.allocate(BUFFER_SIZE)); in testInterruptReadableChannel() 179 private void testInterruptWritableChannel(final WritableByteChannel channel) throws Exception { in testInterruptWritableChannel() argument 184 channel.write(ByteBuffer.allocate(BUFFER_SIZE)); in testInterruptWritableChannel()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/spi/ |
D | AbstractSelectableChannelTest.java | 118 assertSame(sc, acceptKey.channel()); in test_register_LSelectorILObject() 126 SocketChannel channel = SocketChannel.open(); in test_register_LSelectorILObject() local 127 channel.configureBlocking(false); in test_register_LSelectorILObject() 129 channel.register(selector, 0); in test_register_LSelectorILObject() 131 channel.close(); in test_register_LSelectorILObject()
|
D | AbstractSelectionKeyTest.java | 56 public SelectableChannel channel() { in channel() method in AbstractSelectionKeyTest.MockSelectionKey
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldSocketTest.java | 1087 SocketChannel channel = SocketChannel.open(); in test_connectLjava_net_SocketAddress() local 1088 channel.configureBlocking(false); in test_connectLjava_net_SocketAddress() 1089 Socket socket = channel.socket(); in test_connectLjava_net_SocketAddress() 1392 SocketChannel channel = SocketChannel.open(); in test_connectLjava_net_SocketAddressI() local 1393 channel.configureBlocking(false); in test_connectLjava_net_SocketAddressI() 1394 Socket socket = channel.socket(); in test_connectLjava_net_SocketAddressI() 1400 channel.close(); in test_connectLjava_net_SocketAddressI() 1693 SocketChannel channel = SocketChannel.open(); in test_getChannel() local 1694 Socket socket = channel.socket(); in test_getChannel() 1695 assertEquals(channel, socket.getChannel()); in test_getChannel() [all …]
|
/libcore/ojluni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelector.java | 185 ((AbstractSelectableChannel)key.channel()).removeKey(key); in deregister()
|