public static URI toURI(URL url) throws URISyntaxException {
        return toURI(url.toString());
    }
Create a URI instance for the given URL,
replacing spaces with "%20" URI encoding first.

@param url the URL to convert into a URI instance
@return the URI instance
@throws URISyntaxException if the URL wasn't a valid URI
see java.net.URL#toURI()
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/util/ResourceUtils.java