protected boolean isUrl(String token) {
   for (String protocol : WordTokenizer.getProtocols()) {
     if (token.startsWith(protocol + "://")) {
       return true;
     }
   }
   return false;
 }
Пример #2
0
 /** @since 3.0 */
 public static boolean isUrl(String token) {
   for (String protocol : WordTokenizer.getProtocols()) {
     if (token.startsWith(protocol + "://") || token.startsWith("www.")) {
       return true;
     }
   }
   return false;
 }
 protected boolean isUrl(String token) {
   return WordTokenizer.isUrl(token);
 }