< prev index next >
src/java.base/share/classes/java/net/NetworkInterface.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
*** 339,349 ****
*
* @apiNote this method can be used in combination with
* {@link #getInetAddresses()} to obtain all IP addresses for this node
*
* @return an Enumeration of NetworkInterfaces found on this machine
! * @exception SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @see #networkInterfaces()
*/
public static Enumeration<NetworkInterface> getNetworkInterfaces()
--- 339,349 ----
*
* @apiNote this method can be used in combination with
* {@link #getInetAddresses()} to obtain all IP addresses for this node
*
* @return an Enumeration of NetworkInterfaces found on this machine
! * @throws SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @see #networkInterfaces()
*/
public static Enumeration<NetworkInterface> getNetworkInterfaces()
*** 369,379 ****
* Stream<InetAddress> addrs = NetworkInterface.networkInterfaces()
* .flatMap(NetworkInterface::inetAddresses);
* }</pre>
*
* @return a Stream of NetworkInterfaces found on this machine
! * @exception SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @since 9
*/
public static Stream<NetworkInterface> networkInterfaces()
--- 369,379 ----
* Stream<InetAddress> addrs = NetworkInterface.networkInterfaces()
* .flatMap(NetworkInterface::inetAddresses);
* }</pre>
*
* @return a Stream of NetworkInterfaces found on this machine
! * @throws SocketException if an I/O error occurs,
* or if the platform does not have at least one configured
* network interface.
* @since 9
*/
public static Stream<NetworkInterface> networkInterfaces()
*** 448,458 ****
/**
* Returns whether a network interface is up and running.
*
* @return {@code true} if the interface is up and running.
! * @exception SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean isUp() throws SocketException {
return isUp0(name, index);
--- 448,458 ----
/**
* Returns whether a network interface is up and running.
*
* @return {@code true} if the interface is up and running.
! * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean isUp() throws SocketException {
return isUp0(name, index);
*** 460,470 ****
/**
* Returns whether a network interface is a loopback interface.
*
* @return {@code true} if the interface is a loopback interface.
! * @exception SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean isLoopback() throws SocketException {
return isLoopback0(name, index);
--- 460,470 ----
/**
* Returns whether a network interface is a loopback interface.
*
* @return {@code true} if the interface is a loopback interface.
! * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean isLoopback() throws SocketException {
return isLoopback0(name, index);
*** 475,485 ****
* A typical point to point interface would be a PPP connection through
* a modem.
*
* @return {@code true} if the interface is a point to point
* interface.
! * @exception SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean isPointToPoint() throws SocketException {
return isP2P0(name, index);
--- 475,485 ----
* A typical point to point interface would be a PPP connection through
* a modem.
*
* @return {@code true} if the interface is a point to point
* interface.
! * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean isPointToPoint() throws SocketException {
return isP2P0(name, index);
*** 487,497 ****
/**
* Returns whether a network interface supports multicasting or not.
*
* @return {@code true} if the interface supports Multicasting.
! * @exception SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean supportsMulticast() throws SocketException {
return supportsMulticast0(name, index);
--- 487,497 ----
/**
* Returns whether a network interface supports multicasting or not.
*
* @return {@code true} if the interface supports Multicasting.
! * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public boolean supportsMulticast() throws SocketException {
return supportsMulticast0(name, index);
*** 506,516 ****
* @return a byte array containing the address, or {@code null} if
* the address doesn't exist, is not accessible or a security
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
*
! * @exception SocketException if an I/O error occurs.
* @since 1.6
*/
public byte[] getHardwareAddress() throws SocketException {
SecurityManager sec = System.getSecurityManager();
if (sec != null) {
--- 506,516 ----
* @return a byte array containing the address, or {@code null} if
* the address doesn't exist, is not accessible or a security
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
*
! * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public byte[] getHardwareAddress() throws SocketException {
SecurityManager sec = System.getSecurityManager();
if (sec != null) {
*** 533,543 ****
/**
* Returns the Maximum Transmission Unit (MTU) of this interface.
*
* @return the value of the MTU for that interface.
! * @exception SocketException if an I/O error occurs.
* @since 1.6
*/
public int getMTU() throws SocketException {
return getMTU0(name, index);
}
--- 533,543 ----
/**
* Returns the Maximum Transmission Unit (MTU) of this interface.
*
* @return the value of the MTU for that interface.
! * @throws SocketException if an I/O error occurs.
* @since 1.6
*/
public int getMTU() throws SocketException {
return getMTU0(name, index);
}
< prev index next >