equal
deleted
inserted
replaced
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 } |