String[] schemes = {"http","https"};
UrlValidator urlValidator = new UrlValidator(schemes, UrlValidator.ALLOW_ALL_SCHEMES);
System.out.println(urlValidator.isValid(myUrl));
the following URL says, invalid. Any one know why is that. the localnet is a localnetwork. But this works for any other public network (it seems).
http://aunt.localnet/songs/barnbeat.ogg
As I thought, its failing on the top level;
String topLevel = domainSegment[segmentCount - 1];
if (topLevel.length() < 2 || topLevel.length() > 4) {
return false;
}
your top level is localnet
.