めんどくさいのでクラスにした簡単なのがありました。
public static void main(String[] args) {
String regex = "\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
System.out.println(IsMatch(url,regex));
}
private static boolean IsMatch(String s, String pattern) {
 try {
 Pattern patt = Pattern.compile(pattern);
 Matcher matcher = patt.matcher(s);
 return matcher.matches();
 } catch (RuntimeException e) {
 return false;
 }
 }