/**
* This is used to check the given URL is valid or not.
* @param url
* @return true if url is valid, false otherwise.
*/
private boolean isValidUrl(String url) {
Pattern p = Patterns.WEB_URL;
Matcher m = p.matcher(url.toLowerCase());
return m.matches();
}