jdk/src/share/classes/java/net/InetAddress.java
changeset 20821 e0d0a585aa49
parent 16870 f35b2bd19761
child 20831 96cf18811858
equal deleted inserted replaced
20820:804df7412352 20821:e0d0a585aa49
   211             this.hostName = hostName;
   211             this.hostName = hostName;
   212             this.address = address;
   212             this.address = address;
   213             this.family = family;
   213             this.family = family;
   214         }
   214         }
   215 
   215 
       
   216         void init(String hostName, int family) {
       
   217             this.hostName = hostName;
       
   218             if (family != -1) {
       
   219                 this.family = family;
       
   220             }
       
   221         }
       
   222 
   216         String hostName;
   223         String hostName;
   217 
   224 
   218         String getHostName() {
   225         String getHostName() {
   219             return hostName;
   226             return hostName;
   220         }
   227         }
   238             return family;
   245             return family;
   239         }
   246         }
   240     }
   247     }
   241 
   248 
   242     /* Used to store the serializable fields of InetAddress */
   249     /* Used to store the serializable fields of InetAddress */
   243     private final transient InetAddressHolder holder;
   250     final transient InetAddressHolder holder;
   244 
   251 
   245     InetAddressHolder holder() {
   252     InetAddressHolder holder() {
   246         return holder;
   253         return holder;
   247     }
   254     }
   248 
   255