< prev index next >
jdk/src/java.base/share/classes/java/net/NetworkInterface.java
Print this page
*** 128,138 ****
* {@link NetPermission}("getNetworkInformation") permission, then all
* InetAddresses are returned.
*
* @return a Stream object with all or a subset of the InetAddresses
* bound to this network interface
! * @since 1.9
*/
public Stream<InetAddress> inetAddresses() {
return streamFromArray(getCheckedInetAddresses());
}
--- 128,138 ----
* {@link NetPermission}("getNetworkInformation") permission, then all
* InetAddresses are returned.
*
* @return a Stream object with all or a subset of the InetAddresses
* bound to this network interface
! * @since 9
*/
public Stream<InetAddress> inetAddresses() {
return streamFromArray(getCheckedInetAddresses());
}
*** 206,216 ****
* Get a Stream of all subinterfaces (also known as virtual
* interfaces) attached to this network interface.
*
* @return a Stream object with all of the subinterfaces
* of this network interface
! * @since 1.9
*/
public Stream<NetworkInterface> subInterfaces() {
return streamFromArray(childs);
}
--- 206,216 ----
* Get a Stream of all subinterfaces (also known as virtual
* interfaces) attached to this network interface.
*
* @return a Stream object with all of the subinterfaces
* of this network interface
! * @since 9
*/
public Stream<NetworkInterface> subInterfaces() {
return streamFromArray(childs);
}
*** 360,370 ****
* .flatMap(NetworkInterface::inetAddresses);
* }</pre>
*
* @return a Stream of NetworkInterfaces found on this machine
* @exception SocketException if an I/O error occurs.
! * @since 1.9
*/
public static Stream<NetworkInterface> networkInterfaces()
throws SocketException {
NetworkInterface[] netifs = getAll();
assert netifs != null && netifs.length > 0;
--- 360,370 ----
* .flatMap(NetworkInterface::inetAddresses);
* }</pre>
*
* @return a Stream of NetworkInterfaces found on this machine
* @exception SocketException if an I/O error occurs.
! * @since 9
*/
public static Stream<NetworkInterface> networkInterfaces()
throws SocketException {
NetworkInterface[] netifs = getAll();
assert netifs != null && netifs.length > 0;
< prev index next >