2002-10-04 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Fri, 4 Oct 2002 08:49:26 +0000 (08:49 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Fri, 4 Oct 2002 08:49:26 +0000 (08:49 +0000)
* java/net/InetAddress.java:
(isMulticastAddress): Added documentation.
(getHostAddress): Added documentation.
(toString): Added documentation.
(getByAddress): Fixed documentation.
(getByName): Added documentation.
(getAllByName): Added documentation.
(getLocalHost): Added documentation.

From-SVN: r57814

libjava/ChangeLog
libjava/java/net/InetAddress.java

index d5108ada8b4b00f0a2bc32cc5a45c9e732155230..ff2671d0d9577ecadd1f6d9e72b03b55e91c5f56 100644 (file)
@@ -1,3 +1,14 @@
+2002-10-04  Michael Koch  <konqueror@gmx.de>
+
+       * java/net/InetAddress.java:
+       (isMulticastAddress): Added documentation.
+       (getHostAddress): Added documentation.
+       (toString): Added documentation.
+       (getByAddress): Fixed documentation.
+       (getByName): Added documentation.
+       (getAllByName): Added documentation.
+       (getLocalHost): Added documentation.
+
 2002-10-04  Michael Koch  <konqueror@gmx.de>
 
        * java/beans/beancontext/BeanContextChildSupport.java:
index 91e34909cfc48f4b981f7e3ddc6fe04201214482..fcdd88cff78b7e552299d4ad26283bd3a449b5fa 100644 (file)
@@ -12,6 +12,7 @@ package java.net;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.IOException;
+import java.io.Serializable;
 
 /**
  * @author Per Bothner
@@ -27,7 +28,7 @@ import java.io.IOException;
  * @specnote This class is not final since JK 1.4
  */
 
-public class InetAddress implements java.io.Serializable
+public class InetAddress implements Serializable
 {
   // The Serialized Form specifies that an int 'address' is saved/restored.
   // This class uses a byte array internally so we'll just do the conversion
@@ -80,6 +81,11 @@ public class InetAddress implements java.io.Serializable
       family = getFamily (address);
   }
 
+  /**
+   * Utility routine to check if the InetAddress is an IP multicast address
+   *
+   * @since 1.1
+   */
   public boolean isMulticastAddress ()
   {
     int len = addr.length;
@@ -127,6 +133,11 @@ public class InetAddress implements java.io.Serializable
       }
   }
 
+  /**
+   * Returns the IP address as string
+   *
+   * @since 1.0.2
+   */
   public String getHostAddress ()
   {
     StringBuffer sbuf = new StringBuffer(40);
@@ -204,6 +215,9 @@ public class InetAddress implements java.io.Serializable
     return true;
   }
 
+  /**
+   * Returns then <code>InetAddress</code> as string
+   */
   public String toString()
   {
     return getHostName()+'/'+getHostAddress();
@@ -215,7 +229,7 @@ public class InetAddress implements java.io.Serializable
    * The argument is in network byte order: the highest order byte of the
    * address is in getAddress()[0].
    *
-   * @exception UnknownHostException If no IP address for the host could
+   * @exception UnknownHostException If IP address has illegal length
    * be found
    *
    * @since 1.4
@@ -236,6 +250,14 @@ public class InetAddress implements java.io.Serializable
   private static native InetAddress[] lookup
   (String hostname, InetAddress addr, boolean all);
 
+  /**
+   * Determines the IP address of a host, given the host's name.
+   *
+   * @exception UnknownHostException If no IP address for the host could
+   * be found
+   * @exception SecurityException If a security manager exists and its
+   * checkConnect method doesn't allow the operation
+   */
   public static InetAddress getByName (String host)
     throws UnknownHostException
   {
@@ -249,6 +271,15 @@ public class InetAddress implements java.io.Serializable
     return iaddr;
   }
 
+  /**
+   * Given the name of a host, returns an array of its IP addresses,
+   * based on the configured name service on the system.
+   *
+   * @exception UnknownHostException If no IP address for the host could
+   * be found
+   * @exception SecurityException If a security manager exists and its
+   * checkConnect method doesn't allow the operation
+   */
   public static InetAddress[] getAllByName (String host)
     throws UnknownHostException
   {
@@ -272,6 +303,12 @@ public class InetAddress implements java.io.Serializable
 
   private static InetAddress localhost = null;
 
+  /**
+   * Returns the local host
+   *
+   * @exception UnknownHostException If no IP address for the host could
+   * be found
+   */
   public static InetAddress getLocalHost() throws UnknownHostException
   {
     SecurityManager s = System.getSecurityManager();