This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

java.net.InetAddress


Hello list,


I commited the attached patcch to add/fix some documentation to 
java.net.InetAddress.


Michael
-- 
Homepage: http://www.worldforge.org/
GPG-key: http://konqueror.dyndns.org/~mkoch/michael.gpg
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1470
diff -u -r1.1470 ChangeLog
--- ChangeLog	4 Oct 2002 08:47:59 -0000	1.1470
+++ ChangeLog	4 Oct 2002 08:49:00 -0000
@@ -1,5 +1,16 @@
 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:
 	Added serialVersionUID.
 	* java/text/Collator.java: (compare): Made documentation HTML-aware.
Index: java/net/InetAddress.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/InetAddress.java,v
retrieving revision 1.8
diff -u -r1.8 InetAddress.java
--- java/net/InetAddress.java	3 Oct 2002 17:17:39 -0000	1.8
+++ java/net/InetAddress.java	4 Oct 2002 08:49:00 -0000
@@ -12,6 +12,7 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.IOException;
+import java.io.Serializable;
 
 /**
  * @author Per Bothner
@@ -27,7 +28,7 @@
  * @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 @@
       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 @@
       }
   }
 
+  /**
+   * Returns the IP address as string
+   *
+   * @since 1.0.2
+   */
   public String getHostAddress ()
   {
     StringBuffer sbuf = new StringBuffer(40);
@@ -204,6 +215,9 @@
     return true;
   }
 
+  /**
+   * Returns then <code>InetAddress</code> as string
+   */
   public String toString()
   {
     return getHostName()+'/'+getHostAddress();
@@ -215,7 +229,7 @@
    * 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 @@
   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 @@
     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 @@
 
   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();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]