jdk/src/share/classes/java/net/Inet4Address.java
changeset 14014 da3648e13e67
parent 10596 39b3a979e600
child 14342 8435a30053c1
equal deleted inserted replaced
14013:10f55dd791e1 14014:da3648e13e67
   175      *
   175      *
   176      * @return a <code>boolean</code> indicating if the InetAddress is
   176      * @return a <code>boolean</code> indicating if the InetAddress is
   177      * a loopback address; or false otherwise.
   177      * a loopback address; or false otherwise.
   178      * @since 1.4
   178      * @since 1.4
   179      */
   179      */
   180     private static final int loopback = 2130706433; /* 127.0.0.1 */
       
   181     public boolean isLoopbackAddress() {
   180     public boolean isLoopbackAddress() {
   182         /* 127.x.x.x */
   181         /* 127.x.x.x */
   183         byte[] byteAddr = getAddress();
   182         byte[] byteAddr = getAddress();
   184         return byteAddr[0] == 127;
   183         return byteAddr[0] == 127;
   185     }
   184     }