Uses of Interface
java.nio.channels.CompletionHandler
-
Packages that use CompletionHandler 软件包 描述 java.nio.channels 定义通道,其表示与能够执行I / O操作的实体的连接,例如文件和套接字; 定义选择器,用于多路复用,非阻塞I / O操作。 -
-
Uses of CompletionHandler in java.nio.channels
Methods in java.nio.channels with parameters of type CompletionHandler Modifier and Type 方法 描述 abstract <A> void
AsynchronousServerSocketChannel. accept(A attachment, CompletionHandler<AsynchronousSocketChannel,? super A> handler)
接受连接。abstract <A> void
AsynchronousSocketChannel. connect(SocketAddress remote, A attachment, CompletionHandler<Void,? super A> handler)
连接此频道。abstract <A> void
AsynchronousFileChannel. lock(long position, long size, boolean shared, A attachment, CompletionHandler<FileLock,? super A> handler)
获取此通道文件的给定区域的锁定。<A> void
AsynchronousFileChannel. lock(A attachment, CompletionHandler<FileLock,? super A> handler)
获取此通道文件的排他锁。<A> void
AsynchronousByteChannel. read(ByteBuffer dst, A attachment, CompletionHandler<Integer,? super A> handler)
从该通道读取到给定缓冲区的字节序列。abstract <A> void
AsynchronousFileChannel. read(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer,? super A> handler)
从给定的文件位置开始,从该通道读取一个字节序列到给定的缓冲区。abstract <A> void
AsynchronousSocketChannel. read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,? super A> handler)
从该通道读取字节序列到给定缓冲区的子序列中。abstract <A> void
AsynchronousSocketChannel. read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer,? super A> handler)
从该通道读取到给定缓冲区的字节序列。<A> void
AsynchronousSocketChannel. read(ByteBuffer dst, A attachment, CompletionHandler<Integer,? super A> handler)
<A> void
AsynchronousByteChannel. write(ByteBuffer src, A attachment, CompletionHandler<Integer,? super A> handler)
从给定的缓冲区向该通道写入一个字节序列。abstract <A> void
AsynchronousFileChannel. write(ByteBuffer src, long position, A attachment, CompletionHandler<Integer,? super A> handler)
从给定的缓冲区向给定的文件位置开始,向该通道写入一个字节序列。abstract <A> void
AsynchronousSocketChannel. write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,? super A> handler)
从给定缓冲区的子序列将一个字节序列写入该通道。abstract <A> void
AsynchronousSocketChannel. write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer,? super A> handler)
Writes a sequence of bytes to this channel from the given buffer.<A> void
AsynchronousSocketChannel. write(ByteBuffer src, A attachment, CompletionHandler<Integer,? super A> handler)
-