Example #1
0
 public InetAddress getAddress(boolean doDNSRequest, boolean allowLocal)
     throws LocalAddressException {
   InetAddress a = addr.getAddress(doDNSRequest);
   if (a == null) return null;
   if (allowLocal || IPUtil.isValidAddress(a, false)) return a;
   throw new LocalAddressException();
 }
Example #2
0
 /**
  * Get the IP address. Look it up if allowed to, but return the last value if it has ever been
  * looked up before; will not trigger a new lookup if it has been looked up before.
  */
 public InetAddress getAddress(boolean doDNSRequest) {
   return addr.getAddress(doDNSRequest);
 }