jdk/src/share/classes/java/net/InetAddress.java
changeset 20839 a3fd5c769680
parent 20831 96cf18811858
parent 19069 1d9cb0d080e3
child 20848 0dc5945a4b01
--- a/jdk/src/share/classes/java/net/InetAddress.java	Thu Aug 08 19:16:27 2013 +0200
+++ b/jdk/src/share/classes/java/net/InetAddress.java	Fri Aug 09 14:43:19 2013 +0100
@@ -303,7 +303,7 @@
     /**
      * Utility routine to check if the InetAddress is an
      * IP multicast address.
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * an IP multicast address
      * @since   JDK1.1
      */
@@ -313,7 +313,7 @@
 
     /**
      * Utility routine to check if the InetAddress in a wildcard address.
-     * @return a <code>boolean</code> indicating if the Inetaddress is
+     * @return a {@code boolean} indicating if the Inetaddress is
      *         a wildcard address.
      * @since 1.4
      */
@@ -324,7 +324,7 @@
     /**
      * Utility routine to check if the InetAddress is a loopback address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a loopback address; or false otherwise.
      * @since 1.4
      */
@@ -335,7 +335,7 @@
     /**
      * Utility routine to check if the InetAddress is an link local address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a link local address; or false if address is not a link local unicast address.
      * @since 1.4
      */
@@ -346,7 +346,7 @@
     /**
      * Utility routine to check if the InetAddress is a site local address.
      *
-     * @return a <code>boolean</code> indicating if the InetAddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      * a site local address; or false if address is not a site local unicast address.
      * @since 1.4
      */
@@ -357,7 +357,7 @@
     /**
      * Utility routine to check if the multicast address has global scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of global scope, false if it is not
      *         of global scope or it is not a multicast address
      * @since 1.4
@@ -369,7 +369,7 @@
     /**
      * Utility routine to check if the multicast address has node scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of node-local scope, false if it is not
      *         of node-local scope or it is not a multicast address
      * @since 1.4
@@ -381,7 +381,7 @@
     /**
      * Utility routine to check if the multicast address has link scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of link-local scope, false if it is not
      *         of link-local scope or it is not a multicast address
      * @since 1.4
@@ -393,7 +393,7 @@
     /**
      * Utility routine to check if the multicast address has site scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of site-local scope, false if it is not
      *         of site-local scope or it is not a multicast address
      * @since 1.4
@@ -405,7 +405,7 @@
     /**
      * Utility routine to check if the multicast address has organization scope.
      *
-     * @return a <code>boolean</code> indicating if the address has
+     * @return a {@code boolean} indicating if the address has
      *         is a multicast address of organization-local scope,
      *         false if it is not of organization-local scope
      *         or it is not a multicast address
@@ -431,9 +431,9 @@
      * in an IllegalArgumentException being thrown.
      *
      * @param   timeout the time, in milliseconds, before the call aborts
-     * @return a <code>boolean</code> indicating if the address is reachable.
+     * @return a {@code boolean} indicating if the address is reachable.
      * @throws IOException if a network error occurs
-     * @throws  IllegalArgumentException if <code>timeout</code> is negative.
+     * @throws  IllegalArgumentException if {@code timeout} is negative.
      * @since 1.5
      */
     public boolean isReachable(int timeout) throws IOException {
@@ -449,10 +449,10 @@
      * privilege can be obtained, otherwise it will try to establish
      * a TCP connection on port 7 (Echo) of the destination host.
      * <p>
-     * The <code>network interface</code> and <code>ttl</code> parameters
+     * The {@code network interface} and {@code ttl} parameters
      * let the caller specify which network interface the test will go through
      * and the maximum number of hops the packets should go through.
-     * A negative value for the <code>ttl</code> will result in an
+     * A negative value for the {@code ttl} will result in an
      * IllegalArgumentException being thrown.
      * <p>
      * The timeout value, in milliseconds, indicates the maximum amount of time
@@ -465,9 +465,9 @@
      * @param   ttl     the maximum numbers of hops to try or 0 for the
      *                  default
      * @param   timeout the time, in milliseconds, before the call aborts
-     * @throws  IllegalArgumentException if either <code>timeout</code>
-     *                          or <code>ttl</code> are negative.
-     * @return a <code>boolean</code>indicating if the address is reachable.
+     * @throws  IllegalArgumentException if either {@code timeout}
+     *                          or {@code ttl} are negative.
+     * @return a {@code boolean}indicating if the address is reachable.
      * @throws IOException if a network error occurs
      * @since 1.5
      */
@@ -493,8 +493,8 @@
      * {@link #getCanonicalHostName() getCanonicalHostName}.
      *
      * <p>If there is a security manager, its
-     * <code>checkConnect</code> method is first called
-     * with the hostname and <code>-1</code>
+     * {@code checkConnect} method is first called
+     * with the hostname and {@code -1}
      * as its arguments to see if the operation is allowed.
      * If the operation is not allowed, it will return
      * the textual representation of the IP address.
@@ -518,8 +518,8 @@
      * here without a security check.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkConnect</code> method
-     * with the hostname and <code>-1</code>
+     * calls its {@code checkConnect} method
+     * with the hostname and {@code -1}
      * as its arguments to see if the calling code is allowed to know
      * the hostname for this IP address, i.e., to connect to the host.
      * If the operation is not allowed, it will return
@@ -546,8 +546,8 @@
      * the FQDN depending on the underlying system configuration.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkConnect</code> method
-     * with the hostname and <code>-1</code>
+     * calls its {@code checkConnect} method
+     * with the hostname and {@code -1}
      * as its arguments to see if the calling code is allowed to know
      * the hostname for this IP address, i.e., to connect to the host.
      * If the operation is not allowed, it will return
@@ -573,8 +573,8 @@
      * Returns the hostname for this address.
      *
      * <p>If there is a security manager, this method first
-     * calls its <code>checkConnect</code> method
-     * with the hostname and <code>-1</code>
+     * calls its {@code checkConnect} method
+     * with the hostname and {@code -1}
      * as its arguments to see if the calling code is allowed to know
      * the hostname for this IP address, i.e., to connect to the host.
      * If the operation is not allowed, it will return
@@ -640,9 +640,9 @@
     }
 
     /**
-     * Returns the raw IP address of this <code>InetAddress</code>
+     * Returns the raw IP address of this {@code InetAddress}
      * object. The result is in network byte order: the highest order
-     * byte of the address is in <code>getAddress()[0]</code>.
+     * byte of the address is in {@code getAddress()[0]}.
      *
      * @return  the raw IP address of this object.
      */
@@ -671,18 +671,18 @@
 
     /**
      * Compares this object against the specified object.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and it represents the same IP address as
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and it represents the same IP address as
      * this object.
      * <p>
-     * Two instances of <code>InetAddress</code> represent the same IP
+     * Two instances of {@code InetAddress} represent the same IP
      * address if the length of the byte arrays returned by
-     * <code>getAddress</code> is the same for both, and each of the
+     * {@code getAddress} is the same for both, and each of the
      * array components is the same for the byte arrays.
      *
      * @param   obj   the object to compare against.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see     java.net.InetAddress#getAddress()
      */
     public boolean equals(Object obj) {
@@ -690,7 +690,7 @@
     }
 
     /**
-     * Converts this IP address to a <code>String</code>. The
+     * Converts this IP address to a {@code String}. The
      * string returned is of the form: hostname / literal IP
      * address.
      *
@@ -981,7 +981,7 @@
      * No name service is checked for the validity of the address.
      *
      * <p> The host name can either be a machine name, such as
-     * "<code>java.sun.com</code>", or a textual representation of its IP
+     * "{@code java.sun.com}", or a textual representation of its IP
      * address.
      * <p> No validity checking is done on the host name either.
      *
@@ -1026,26 +1026,26 @@
      * Determines the IP address of a host, given the host's name.
      *
      * <p> The host name can either be a machine name, such as
-     * "<code>java.sun.com</code>", or a textual representation of its
+     * "{@code java.sun.com}", or a textual representation of its
      * IP address. If a literal IP address is supplied, only the
      * validity of the address format is checked.
      *
-     * <p> For <code>host</code> specified in literal IPv6 address,
+     * <p> For {@code host} specified in literal IPv6 address,
      * either the form defined in RFC 2732 or the literal IPv6 address
      * format defined in RFC 2373 is accepted. IPv6 scoped addresses are also
      * supported. See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
      * scoped addresses.
      *
-     * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
+     * <p> If the host is {@code null} then an {@code InetAddress}
      * representing an address of the loopback interface is returned.
      * See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
      * section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
      * section&nbsp;2.5.3. </p>
      *
-     * @param      host   the specified host, or <code>null</code>.
+     * @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
-     *               <code>host</code> could be found, or if a scope_id was specified
+     *               {@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 checkConnect method doesn't allow the operation
@@ -1066,37 +1066,37 @@
      * based on the configured name service on the system.
      *
      * <p> The host name can either be a machine name, such as
-     * "<code>java.sun.com</code>", or a textual representation of its IP
+     * "{@code java.sun.com}", or a textual representation of its IP
      * address. If a literal IP address is supplied, only the
      * validity of the address format is checked.
      *
-     * <p> For <code>host</code> specified in <i>literal IPv6 address</i>,
+     * <p> For {@code host} specified in <i>literal IPv6 address</i>,
      * either the form defined in RFC 2732 or the literal IPv6 address
      * format defined in RFC 2373 is accepted. A literal IPv6 address may
      * also be qualified by appending a scoped zone identifier or scope_id.
      * The syntax and usage of scope_ids is described
      * <a href="Inet6Address.html#scoped">here</a>.
-     * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
+     * <p> If the host is {@code null} then an {@code InetAddress}
      * representing an address of the loopback interface is returned.
      * See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC&nbsp;3330</a>
      * section&nbsp;2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>
      * section&nbsp;2.5.3. </p>
      *
-     * <p> If there is a security manager and <code>host</code> is not
-     * null and <code>host.length() </code> is not equal to zero, the
+     * <p> If there is a security manager and {@code host} is not
+     * null and {@code host.length() } is not equal to zero, the
      * security manager's
-     * <code>checkConnect</code> method is called
-     * with the hostname and <code>-1</code>
+     * {@code checkConnect} method is called
+     * with the hostname and {@code -1}
      * as its arguments to see if the operation is allowed.
      *
-     * @param      host   the name of the host, or <code>null</code>.
+     * @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
-     *               <code>host</code> could be found, or if a scope_id was specified
+     *               {@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
-     *               <code>checkConnect</code> method doesn't allow the operation.
+     *               {@code checkConnect} method doesn't allow the operation.
      *
      * @see SecurityManager#checkConnect
      */
@@ -1396,9 +1396,9 @@
     }
 
     /**
-     * Returns an <code>InetAddress</code> object given the raw IP address .
+     * Returns an {@code InetAddress} object given the raw IP address .
      * The argument is in network byte order: the highest order
-     * byte of the address is in <code>getAddress()[0]</code>.
+     * byte of the address is in {@code getAddress()[0]}.
      *
      * <p> This method doesn't block, i.e. no reverse name service lookup
      * is performed.
@@ -1424,14 +1424,14 @@
     /**
      * Returns the address of the local host. This is achieved by retrieving
      * the name of the host from the system, then resolving that name into
-     * an <code>InetAddress</code>.
+     * an {@code InetAddress}.
      *
      * <P>Note: The resolved address may be cached for a short period of time.
      * </P>
      *
      * <p>If there is a security manager, its
-     * <code>checkConnect</code> method is called
-     * with the local host name and <code>-1</code>
+     * {@code checkConnect} method is called
+     * with the local host name and {@code -1}
      * as its arguments to see if the operation is allowed.
      * If the operation is not allowed, an InetAddress representing
      * the loopback address is returned.