/libcore/ojluni/src/main/java/java/nio/channels/ |
H A D | FileLock.java | 40 * channel that was used to acquire it, or by the termination of the Java 60 * <p> A file-lock object records the file channel upon whose file the lock is 97 * <p> On some systems, closing a channel releases all locks held by the Java 99 * acquired via that channel or via another channel open on the same file. It 100 * is strongly recommended that, within a program, a unique channel be used to 118 private final Channel channel; field in class:FileLock 126 * @param channel 127 * The file channel upon whose file this lock is held 144 protected FileLock(FileChannel channel, argument 168 public final FileChannel channel() { method in class:FileLock [all...] |
H A D | SelectionKey.java | 36 * <p> A selection key is created each time a channel is registered with a 38 * {@link #cancel cancel} method, by closing its channel, or by closing its 49 * selectable operations that are supported by the key's channel. 60 * the key's channel has been detected to be ready by the key's selector. 67 * <p> That a selection key's ready set indicates that its channel is ready for 73 * corresponding channel. 76 * bits are supported by a given channel depends upon the type of the channel. 79 * identifying just those operations that are supported by the channel. An 81 * channel wil 126 public abstract SelectableChannel channel(); method in class:SelectionKey [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | FileLockImpl.java | 36 FileLockImpl(FileChannel channel, long position, long size, boolean shared) argument 38 super(channel, position, size, shared);
|
H A D | SelectionKeyImpl.java | 41 final SelChImpl channel; // package-private field in class:SelectionKeyImpl 51 channel = ch; 55 public SelectableChannel channel() { method in class:SelectionKeyImpl 56 return (SelectableChannel)channel; 103 if ((ops & ~channel().validOps()) != 0) 105 channel.translateAndSetInterestOps(ops, this);
|
H A D | FileLockTable.java | 40 * Creates and returns a file lock table for a channel that is connected to 43 public static FileLockTable newSharedFileLockTable(Channel channel, argument 47 return new SharedFileLockTable(channel, fd); 113 private final Channel channel; field in class:SharedFileLockTable 115 // File key for the file that this channel is connected to 118 SharedFileLockTable(Channel channel, FileDescriptor fd) throws IOException { argument 119 this.channel = channel; 187 assert (lock != null) && (lock.acquiredBy() == channel); 208 // remove locks obtained by this channel [all...] |
H A D | InheritedChannel.java | 72 * Override the implCloseSelectableChannel for each channel type - this 140 * If standard inherited channel is connected to a socket then return a Channel 147 // or redirected while we create the channel. 149 // the channel (closing one doesn't impact the other) 154 // create a channel so we release the file descriptor. 175 // Now create the channel. If the socket is a streams socket then 201 private static Channel channel = null; field in class:InheritedChannel 204 * Returns a Channel representing the inherited channel if the 205 * inherited channel is a stream connected to a network socket. 212 // If we don't have the channel tr [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/spi/ |
H A D | AbstractSelectionKeyTest.java | 56 public SelectableChannel channel() { method in class:AbstractSelectionKeyTest.MockSelectionKey
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
H A D | FileLockTest.java | 42 protected MockFileLock(FileChannel channel, long position, long size, argument 44 super(channel, position, size, shared); 77 assertNull(fileLock1.channel()); 101 * @tests java.nio.channels.FileLock#channel() 104 assertSame(readWriteChannel, mockLock.channel()); 106 assertNull(lock.channel());
|
H A D | SelectionKeyTest.java | 69 public SelectableChannel channel() { method in class:SelectionKeyTest.MockSelectionKey 124 * @tests java.nio.channels.SelectionKey#channel() 127 assertSame(sc, selectionKey.channel()); 130 assertSame(sc, selectionKey.channel());
|
H A D | ServerSocketChannelTest.java | 261 // socket close makes the channel close 277 // socket close makes the channel close 374 // so must close the server channel with another thread. 381 fail("Fail to close the server channel because of" 524 SocketChannel channel; field in class:ServerSocketChannelTest.WriteChannelThread 528 public WriteChannelThread(SocketChannel channel, ByteBuffer buffer) { argument 529 this.channel = channel; 535 channel.write(buffer); 536 channel [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | FileInputStream.java | 63 private FileChannel channel = null; field in class:FileInputStream 332 * <p> If this stream has an associated channel then the channel is closed 350 if (channel != null) { 352 * Decrement the FD use count associated with the channel 353 * The use count is incremented whenever a new channel 356 channel.close(); 384 * </code>position<code>} of the returned channel will be equal to the 386 * stream will increment the channel's position. Changing the channel' [all...] |
H A D | FileOutputStream.java | 76 * The associated channel, initalized lazily. 78 private FileChannel channel; field in class:FileOutputStream 328 * <p> If this stream has an associated channel then the channel is closed 346 if (channel != null) { 348 * Decrement FD use count associated with the channel 349 * The use count is incremented whenever a new channel 352 channel.close(); 381 * </code>position<code>} of the returned channel will be equal to the 384 * Writing bytes to this stream will increment the channel' [all...] |
H A D | RandomAccessFile.java | 74 private FileChannel channel = null; field in class:RandomAccessFile 276 * </code>position<code>} of the returned channel will always be equal to 280 * will change the position of the channel, and vice versa. Changing the 282 * channel, and vice versa. 284 * @return the file channel associated with this file 291 if (channel == null) { 292 channel = FileChannelImpl.open(fd, path, true, rw, this); 294 return channel; 611 * <p> If this file has an associated channel then the channel i [all...] |
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | InterruptedStreamTest.java | 142 private void testInterruptReadableChannel(final ReadableByteChannel channel) throws Exception { argument 145 channel.read(ByteBuffer.allocate(BUFFER_SIZE)); 179 private void testInterruptWritableChannel(final WritableByteChannel channel) throws Exception { argument 184 channel.write(ByteBuffer.allocate(BUFFER_SIZE));
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
H A D | FileIOInterruptTest.java | 402 // Now close the channel to see what happens. 538 private final FileChannel channel; field in class:FileIOInterruptTest.ChannelReader 544 ChannelReader(FileChannel channel, Method method) { argument 545 this.channel = channel; 555 channel.read(buffer); 558 channel.read(new ByteBuffer[] { buffer, buffer2 }); 583 private final FileChannel channel; field in class:FileIOInterruptTest.ChannelWriter 589 ChannelWriter(FileChannel channel, Method method) { argument 590 this.channel [all...] |
H A D | OldFileChannelTest.java | 503 private void doTestForIOOBException(FileChannel channel, argument 506 channel.read(buffer, -1, 0); 512 channel.read(buffer, 0, -1); 518 channel.read(buffer, 0, 3); 524 channel.read(buffer, 1, 2); 530 channel.read(buffer, 2, 1); 536 channel.read(buffer, 3, 0); 645 FileChannel channel = out.getChannel(); 647 assertTrue("Assert 0: Channel is not open", channel.isOpen()); 649 assertFalse("Assert 0: Channel is still open", channel [all...] |