/libcore/luni/src/main/java/java/nio/channels/ |
D | Channels.java | 58 public static InputStream newInputStream(ReadableByteChannel channel) { in newInputStream() argument 59 return new ChannelInputStream(channel); in newInputStream() 78 public static OutputStream newOutputStream(WritableByteChannel channel) { in newOutputStream() argument 79 return new ChannelOutputStream(channel); in newOutputStream() 129 public static Reader newReader(ReadableByteChannel channel, in newReader() argument 135 return new InputStreamReader(new ChannelInputStream(channel), decoder); in newReader() 150 public static Reader newReader(ReadableByteChannel channel, in newReader() argument 155 return newReader(channel, Charset.forName(charsetName).newDecoder(), -1); in newReader() 171 public static Writer newWriter(WritableByteChannel channel, in newWriter() argument 177 return new OutputStreamWriter(new ChannelOutputStream(channel), encoder); in newWriter() [all …]
|
D | FileLock.java | 74 private final FileChannel channel; field in FileLock 99 protected FileLock(FileChannel channel, long position, long size, boolean shared) { in FileLock() argument 103 this.channel = channel; in FileLock() 112 public final FileChannel channel() { in channel() method in FileLock 113 return channel; in channel()
|
D | SelectionKey.java | 110 public abstract SelectableChannel channel(); in channel() method in SelectionKey
|
/libcore/luni/src/main/java/java/nio/ |
D | SelectionKeyImpl.java | 32 private AbstractSelectableChannel channel; field in SelectionKeyImpl 40 public SelectionKeyImpl(AbstractSelectableChannel channel, int operations, in SelectionKeyImpl() argument 42 this.channel = channel; in SelectionKeyImpl() 49 public SelectableChannel channel() { in channel() method in SelectionKeyImpl 50 return channel; in channel() 70 if ((operations & ~(channel().validOps())) != 0) { in interestOps() 110 return !(channel instanceof SocketChannel) || ((SocketChannel) channel).isConnected(); in isConnected()
|
D | PipeImpl.java | 62 private final SocketChannel channel; field in PipeImpl.PipeSourceChannel 67 this.channel = new SocketChannelImpl(selectorProvider, fd); in PipeSourceChannel() 71 channel.close(); in implCloseSelectableChannel() 79 return channel.read(buffer); in read() 83 return channel.read(buffers); in read() 87 return channel.read(buffers, offset, length); in read() 97 private final SocketChannel channel; field in PipeImpl.PipeSinkChannel 102 this.channel = new SocketChannelImpl(selectorProvider, fd); in PipeSinkChannel() 106 channel.close(); in implCloseSelectableChannel() 114 return channel.write(buffer); in write() [all …]
|
D | SocketChannelImpl.java | 495 private final SocketChannelImpl channel; field in SocketChannelImpl.SocketAdapter 498 SocketAdapter(PlainSocketImpl socketImpl, SocketChannelImpl channel) in SocketAdapter() argument 502 this.channel = channel; in SocketAdapter() 506 if (channel.isBound) { in SocketAdapter() 507 onBind(channel.localAddress, channel.localPort); in SocketAdapter() 509 if (channel.isConnected()) { in SocketAdapter() 510 onConnect(channel.connectAddress.getAddress(), channel.connectAddress.getPort()); in SocketAdapter() 512 if (!channel.isOpen()) { in SocketAdapter() 520 return channel; in getChannel() 525 if (!channel.isBlocking()) { in connect() [all …]
|
D | SelectorImpl.java | 124 @Override protected SelectionKey register(AbstractSelectableChannel channel, in register() argument 126 if (!provider().equals(channel.provider())) { in register() 131 SelectionKeyImpl selectionKey = new SelectionKeyImpl(channel, operations, in register() 223 setPollFd(i++, ((FileDescriptorChannel) key.channel()).getFD(), eventMask, key); in preparePollFds()
|
D | FileChannelImpl.java | 140 public FileLockImpl(FileChannel channel, long position, long size, boolean shared) { in FileLockImpl() argument 141 super(channel, position, size, shared); in FileLockImpl() 145 return !isReleased && channel().isOpen(); in isValid() 149 if (!channel().isOpen()) { in release() 153 ((FileChannelImpl) channel()).release(this); in release()
|
/libcore/luni/src/main/java/java/io/ |
D | FileOutputStream.java | 58 private FileChannel channel; field in FileOutputStream 104 this.channel = NioUtils.newFileChannel(this, fd, mode); in FileOutputStream() 134 if (channel != null) { in close() 135 channel.close(); in close() 170 if (channel == null) { in getChannel() 171 channel = NioUtils.newFileChannel(this, fd, mode); in getChannel() 173 return channel; in getChannel()
|
D | FileInputStream.java | 60 private FileChannel channel; field in FileInputStream 115 if (channel != null) { in close() 116 channel.close(); in close() 158 if (channel == null) { in getChannel() 159 channel = NioUtils.newFileChannel(this, fd, O_RDONLY); in getChannel() 161 return channel; in getChannel()
|
D | RandomAccessFile.java | 51 private FileChannel channel; field in RandomAccessFile 161 if (channel != null && channel.isOpen()) { in close() 162 channel.close(); in close() 163 channel = null; in close() 191 if(channel == null) { in getChannel() 192 channel = NioUtils.newFileChannel(this, fd, mode); in getChannel() 194 return channel; in getChannel()
|
/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();
|
D | ServerSocketChannelTest.java | 524 SocketChannel channel; field in ServerSocketChannelTest.WriteChannelThread 528 public WriteChannelThread(SocketChannel channel, ByteBuffer buffer) { in WriteChannelThread() argument 529 this.channel = channel; in WriteChannelThread() 535 channel.write(buffer); in run() 536 channel.close(); in run()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
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 | 530 private final FileChannel channel; field in FileIOInterruptTest.ChannelReader 536 ChannelReader(FileChannel channel, Method method) { in ChannelReader() argument 537 this.channel = channel; in ChannelReader() 547 channel.read(buffer); in run() 550 channel.read(new ByteBuffer[] { buffer, buffer2 }); in run() 575 private final FileChannel channel; field in FileIOInterruptTest.ChannelWriter 581 ChannelWriter(FileChannel channel, Method method) { in ChannelWriter() argument 582 this.channel = channel; in ChannelWriter() 598 bytesWritten += channel.write(buffer1); in run() 600 bytesWritten += channel.write(new ByteBuffer[]{ buffer1, buffer2 }); in run()
|
D | OldSocketChannelTest.java | 90 SocketChannel channel = in testConstructor() local 92 assertNotNull(channel); in testConstructor() 93 assertSame(SelectorProvider.provider(), channel.provider()); in testConstructor() 94 channel = SocketChannel.open(); in testConstructor() 95 assertNotNull(channel); in testConstructor() 96 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/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/luni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelector.java | 98 protected abstract SelectionKey register(AbstractSelectableChannel channel, in register() argument 105 ((AbstractSelectableChannel) key.channel()).deregister(key); in deregister()
|
/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/main/java/java/util/logging/ |
D | FileHandler.java | 191 FileChannel channel = fileStream.getChannel(); in initOutputFiles() local 197 lock = channel.tryLock(); in initOutputFiles() 494 FileChannel channel = lock.channel(); in close() local 496 channel.close(); in close()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldSocketTest.java | 1098 SocketChannel channel = SocketChannel.open(); in test_connectLjava_net_SocketAddress() local 1099 channel.configureBlocking(false); in test_connectLjava_net_SocketAddress() 1100 Socket socket = channel.socket(); in test_connectLjava_net_SocketAddress() 1391 SocketChannel channel = SocketChannel.open(); in test_connectLjava_net_SocketAddressI() local 1392 channel.configureBlocking(false); in test_connectLjava_net_SocketAddressI() 1393 Socket socket = channel.socket(); in test_connectLjava_net_SocketAddressI() 1399 channel.close(); in test_connectLjava_net_SocketAddressI() 1692 SocketChannel channel = SocketChannel.open(); in test_getChannel() local 1693 Socket socket = channel.socket(); in test_getChannel() 1694 assertEquals(channel, socket.getChannel()); in test_getChannel() [all …]
|