Class URILocationResolver


  • public final class URILocationResolver
    extends Object
    URI resolver used to resolve URI as URL, based on a base URI, to load external document.
    Author:
    Christophe DENEUX - Capgemini Sud
    • Constructor Detail

      • URILocationResolver

        public URILocationResolver()
    • Method Detail

      • resolve

        public URL resolve​(URI baseURI,
                           URI uri)
                    throws MalformedURLException

        Resolve the uri according to the baseURI.

        If baseURI is null, the return value is the uri converted into URL using URI.toURL(). Otherwise the return value is the result of URL(URL, String).

        Parameters:
        baseURI - The base URI.
        uri - The URI to resolve.
        Returns:
        The resolved URI as an URL.
        Throws:
        MalformedURLException - The resolved URI is not a well-formed URL.