Using the java.net.URL class will let you access the resource easily. So
if your schema uses xs:anyURI to represent an accessible resource, go
ahead and use java.net.URL.
OTOH, xs:anyURI is often used to represent an abstract identifier where
one is not expected to access the resource itself (such as URIs used as
namespace URIs) In this case, java.net.URL doesn't work well.
For example, "urn:kohsuke:myproject:extension" is (I think) a correct URI,
but java.net.URL won't even parse it.
So the answer depends on what kind of URI your schema is using.
--
Kohsuke Kawaguchi <kohsuke.kawaguchi_at_sun.com>