コード例 #1
0
 /**
  * Validates the bind address. The address may be a host name or IP address, but it must not be
  * empty and must be usable for creating an InetAddress. Cannot have a leading '/' (which
  * InetAddress.toString() produces).
  *
  * @param bindAddress host name or IP address to validate
  */
 public static boolean validateBindAddress(String bindAddress) {
   if (bindAddress == null || bindAddress.length() == 0) return true;
   if (InetAddressUtil.validateHost(bindAddress) == null) return false;
   return true;
 }