List of utility methods to do URL Parse
String | hostFromUrl(String url) host From Url String host = url; int index = host.indexOf("://"); if (index != -1) { host = host.substring(index + 3); index = host.indexOf("/"); if (index != -1) { host = host.substring(0, index); ... |
boolean | hasParameter(String url, String name) has Parameter int index = url.lastIndexOf('/') + 1; if (index == -1 || index >= url.length()) { return false; index = url.indexOf('?', index); while (index != -1) { int start = index + 1; if (start >= url.length()) { ... |
boolean | validateUrl(String url) validate Url return Patterns.WEB_URL.matcher(url).matches();
|