提交 2a929b86 编写于 作者: M michaelm

7120665: Change Java SE spec so that external networking not required

Reviewed-by: alanb
上级 3d577f3f
...@@ -326,8 +326,10 @@ public final class NetworkInterface { ...@@ -326,8 +326,10 @@ public final class NetworkInterface {
} }
/** /**
* Returns all the interfaces on this machine. Returns null if no * Returns all the interfaces on this machine. The {@code Enumeration}
* network interfaces could be found on this machine. * contains at least one element, possibly representing a loopback
* interface that only supports communication between entities on
* this machine.
* *
* NOTE: can use getNetworkInterfaces()+getInetAddresses() * NOTE: can use getNetworkInterfaces()+getInetAddresses()
* to obtain all IP addresses for this node * to obtain all IP addresses for this node
......
...@@ -65,6 +65,7 @@ Provides the classes for implementing networking applications. ...@@ -65,6 +65,7 @@ Provides the classes for implementing networking applications.
<p>Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the {@link java.net.Socket#getInputStream} and {@link java.net.Socket#getOutputStream} methods.</p> <p>Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the {@link java.net.Socket#getInputStream} and {@link java.net.Socket#getOutputStream} methods.</p>
<h2>Interfaces</h2> <h2>Interfaces</h2>
<p>The {@link java.net.NetworkInterface} class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.</p> <p>The {@link java.net.NetworkInterface} class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.</p>
<p>Note, all conforming implementations must support at least one {@code NetworkInterface} object, which must either be connected to a network, or be a "loopback" interface that can only communicate with entities on the same machine.</p>
<h2>High level API</h2> <h2>High level API</h2>
<p>A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are: <p>A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册