class IpAddressUtil {

  public static void validateFormat(String ip) throws IpAddressException {
    if (!ip.trim().matches(Settings.IP_REGEX)) {
      throw new IpAddressException("Ip format is invalid " + ip);
    }
  }

}