Reputation: 4069
I'm looking for replacement for java.net.URL.
My only interest is in modeling and syntax validation. Nice features are abilities to extract only parts of the URL, removal of fragment sign etc.
I'm not interested in network capabilities of any kind, and the class shouldn't do any network operation.
Another requirement is minimum dependencies.
The problem with current java.net.URL is that it can't model protocols other than [http, https, ftp, file, and jar].
Thanks!
Upvotes: 2
Views: 2550
Reputation: 11767
If you just want to validate a URL, you should probably look at URLValidator from Apache Commons Validator project. The validator supports different schemes as well.
Upvotes: 1
Reputation: 8089
Take a look at java.net.URI
which can be used as a replacement of evil java.net.URL
.
Upvotes: 10