Java URL Value Check isHttpUrl(String in)

Here you can find the source of isHttpUrl(String in)

Description

is Http Url

License

Apache License

Declaration

public static boolean isHttpUrl(String in) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.MalformedURLException;
import java.net.URL;

public class Main {
    public static boolean isHttpUrl(String in) {
        try {//from  w w  w. j  av  a  2 s.  c  om
            URL url = new URL(in);
            return url.getProtocol().toLowerCase().startsWith("http");
        } catch (MalformedURLException ignored) {
        }
        return false;
    }
}

Related

  1. isHosting(URL url_in)
  2. isHTTP(URL url)
  3. isHttpOk(String url)
  4. isHttpUrl(final URI toCheck)
  5. isHttpUrl(final URL url)
  6. isHttpUrl(URL url)
  7. isHttpUrl(URL url)
  8. isHttpURLAvailable(final String url)
  9. isInternetReachable(String url)