软件包 | 描述 |
---|---|
java.net |
为实现网络应用程序提供类。
|
java.nio.channels |
定义了渠道,它代表的是能够执行I/O操作的实体连接,如文件和套接字;定义选择器,多路复用,非阻塞I/O操作。
|
java.nio.channels.spi |
为
java.nio.channels 包服务提供商类。
|
Modifier and Type | Method and Description |
---|---|
SocketChannel |
Socket.getChannel()
返回与此套接字关联的独特的
SocketChannel 对象,如果任何。
|
Modifier and Type | Method and Description |
---|---|
abstract SocketChannel |
ServerSocketChannel.accept()
接受这个通道的套接字的连接。
|
abstract SocketChannel |
SocketChannel.bind(SocketAddress local) |
static SocketChannel |
SocketChannel.open()
打开一个套接字通道。
|
static SocketChannel |
SocketChannel.open(SocketAddress remote)
打开一个套接字通道,并将其连接到远程地址。
|
abstract <T> SocketChannel |
SocketChannel.setOption(SocketOption<T> name, T value) |
abstract SocketChannel |
SocketChannel.shutdownInput()
关闭不关闭通道的连接。
|
abstract SocketChannel |
SocketChannel.shutdownOutput()
关闭不关闭通道的连接。
|
Modifier and Type | Method and Description |
---|---|
abstract SocketChannel |
SelectorProvider.openSocketChannel()
打开一个套接字通道。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.