class FormatUtils {

    public static boolean isValidUrl(String url) {
        boolean hasValidProtocol;
        boolean hasValidHost;
        try {
            hasValidProtocol = isHttpsUrl(url) || url.startsWith(HTTP_PROTOCOL);
            URL wsdlUrl = new URL(url);
            String asciiHost = IDN.toASCII(wsdlUrl.getHost());
            hasValidHost = asciiHost.matches(URL_HOST_REGEX);
        } catch (MalformedURLException | IllegalArgumentException e) {
            return false;
        }
        return hasValidProtocol && hasValidHost;
    }

    private  FormatUtils();

}