Here you can find the source of isValidChannelUrl(String url)
public static boolean isValidChannelUrl(String url)
//package com.java2s; //License from project: Open Source License import java.net.URI; import java.net.URISyntaxException; public class Main { public static boolean isValidChannelUrl(String url) { try {// w w w . java2 s . c o m URI uri = new URI(url); return uri.getPath().contains("/channel/"); } catch (URISyntaxException e) { return false; } } }