src/share/classes/java/net/InetAddress.java

Print this page




 217      *
 218      * @serial
 219      */
 220     int family;
 221 
 222     /* Used to store the name service provider */
 223     private static List<NameService> nameServices = null;
 224 
 225     /* Used to store the best available hostname */
 226     private transient String canonicalHostName = null;
 227 
 228     /** use serialVersionUID from JDK 1.0.2 for interoperability */
 229     private static final long serialVersionUID = 3286316764910316507L;
 230 
 231     /*
 232      * Load net library into runtime, and perform initializations.
 233      */
 234     static {
 235         preferIPv6Address = java.security.AccessController.doPrivileged(
 236             new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
 237         AccessController.doPrivileged(new LoadLibraryAction("net"));






 238         init();
 239     }
 240 
 241     /**
 242      * Constructor for the Socket.accept() method.
 243      * This creates an empty InetAddress, which is filled in by
 244      * the accept() method.  This InetAddress, however, is not
 245      * put in the address cache, since it is not created by name.
 246      */
 247     InetAddress() {
 248     }
 249 
 250     /**
 251      * Replaces the de-serialized object with an Inet4Address object.
 252      *
 253      * @return the alternate object to the de-serialized object.
 254      *
 255      * @throws ObjectStreamException if a new object replacing this
 256      * object could not be created
 257      */




 217      *
 218      * @serial
 219      */
 220     int family;
 221 
 222     /* Used to store the name service provider */
 223     private static List<NameService> nameServices = null;
 224 
 225     /* Used to store the best available hostname */
 226     private transient String canonicalHostName = null;
 227 
 228     /** use serialVersionUID from JDK 1.0.2 for interoperability */
 229     private static final long serialVersionUID = 3286316764910316507L;
 230 
 231     /*
 232      * Load net library into runtime, and perform initializations.
 233      */
 234     static {
 235         preferIPv6Address = java.security.AccessController.doPrivileged(
 236             new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
 237         AccessController.doPrivileged(
 238             new java.security.PrivilegedAction<Void>() {
 239                 public Void run() {
 240                     System.loadLibrary("net");
 241                     return null;
 242                 }
 243             });
 244         init();
 245     }
 246 
 247     /**
 248      * Constructor for the Socket.accept() method.
 249      * This creates an empty InetAddress, which is filled in by
 250      * the accept() method.  This InetAddress, however, is not
 251      * put in the address cache, since it is not created by name.
 252      */
 253     InetAddress() {
 254     }
 255 
 256     /**
 257      * Replaces the de-serialized object with an Inet4Address object.
 258      *
 259      * @return the alternate object to the de-serialized object.
 260      *
 261      * @throws ObjectStreamException if a new object replacing this
 262      * object could not be created
 263      */