SyntaxFix
Write A Post
Hire A Developer
Questions
Here is way I tried and found useful,
URL u = new URL(name); // this would check for the protocol u.toURI(); // does the extra checking required for validation of URI