List of utility methods to do URL Value Check
boolean | isURL(final String urlString) Check if a URL is actually a URL try { new URL(urlString); } catch (Exception e) { return false; return true; |
boolean | isURL(Object obj) is URL try { new URL(obj.toString()); return true; } catch (Exception e) { return false; |
boolean | isUrl(String input) is Url String urlString; if (input.startsWith("http://")) { urlString = input; } else { urlString = "http://" + input; try { URL url = new URL(urlString); ... |
boolean | isURL(String name) is URL try { new URL(name); return true; } catch (Exception e) { return false; |
boolean | isURL(String possibleURL) Check if string is a valid URL. boolean result = false; try { URL url = new URL(possibleURL); result = true; } catch (Exception e) { return result; |
boolean | isUrl(String resourceLocation) Return whether the given resource location is a URL: either a special "classpath" pseudo URL or a standard URL. if (resourceLocation.startsWith(CLASSPATH_URL_PREFIX)) { return true; try { new URL(resourceLocation); return true; } catch (MalformedURLException ex) { return false; ... |
boolean | isUrl(String resourceLocation) is Url if (resourceLocation == null) { return false; } else if (resourceLocation.startsWith("classpath:")) { return true; } else { try { new URL(resourceLocation); return true; ... |
boolean | isUrl(String s) is Url s = s.trim(); boolean missingScheme = false; if (!scheme.matcher(s).find()) { return false; try { URL u = new URL(s); return true; ... |
boolean | isUrl(String s) is Url if (true) { try { URL u = new URL(s); return (u != null); } catch (MalformedURLException e) { return false; } else { ... |
boolean | isURL(String str) is URL if (str.startsWith("http:") || str.startsWith("https:") || str.startsWith("file:") || str.startsWith("ftp:") || str.startsWith("soap:")) { return true; try { new java.net.URL(str); return true; } catch (java.net.MalformedURLException e) { ... |