< prev index next >
src/java.base/share/classes/java/net/InetAddress.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
@@ -1159,11 +1159,11 @@
* must be 16 bytes long
*
* @param host the specified host
* @param addr the raw IP address in network byte order
* @return an InetAddress object created from the raw IP address.
- * @exception UnknownHostException if IP address is of illegal length
+ * @throws UnknownHostException if IP address is of illegal length
* @since 1.4
*/
public static InetAddress getByAddress(String host, byte[] addr)
throws UnknownHostException {
if (host != null && !host.isEmpty() && host.charAt(0) == '[') {
@@ -1214,14 +1214,14 @@
* {@code checkConnect} method is called with the hostname and {@code -1}
* as its arguments to determine if the operation is allowed.
*
* @param host the specified host, or {@code null}.
* @return an IP address for the given host name.
- * @exception UnknownHostException if no IP address for the
+ * @throws UnknownHostException if no IP address for the
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
- * @exception SecurityException if a security manager exists
+ * @throws SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation
*/
public static InetAddress getByName(String host)
throws UnknownHostException {
return InetAddress.getAllByName(host)[0];
@@ -1262,14 +1262,14 @@
* as its arguments to determine if the operation is allowed.
*
* @param host the name of the host, or {@code null}.
* @return an array of all the IP addresses for a given host name.
*
- * @exception UnknownHostException if no IP address for the
+ * @throws UnknownHostException if no IP address for the
* {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
- * @exception SecurityException if a security manager exists and its
+ * @throws SecurityException if a security manager exists and its
* {@code checkConnect} method doesn't allow the operation.
*
* @see SecurityManager#checkConnect
*/
public static InetAddress[] getAllByName(String host)
@@ -1540,11 +1540,11 @@
* <p> IPv4 address byte array must be 4 bytes long and IPv6 byte array
* must be 16 bytes long
*
* @param addr the raw IP address in network byte order
* @return an InetAddress object created from the raw IP address.
- * @exception UnknownHostException if IP address is of illegal length
+ * @throws UnknownHostException if IP address is of illegal length
* @since 1.4
*/
public static InetAddress getByAddress(byte[] addr)
throws UnknownHostException {
return getByAddress(null, addr);
@@ -1578,11 +1578,11 @@
* If the operation is not allowed, an InetAddress representing
* the loopback address is returned.
*
* @return the address of the local host.
*
- * @exception UnknownHostException if the local host name could not
+ * @throws UnknownHostException if the local host name could not
* be resolved into an address.
*
* @see SecurityManager#checkConnect
* @see java.net.InetAddress#getByName(java.lang.String)
*/
< prev index next >