class UrlUtilities {

    public static URL toURLNew(String urlOrPathString)
    {
        URL url = null;
        if (StringUtils.isNotEmpty(urlOrPathString))
        {
            String urlString = hasValidProtocol(urlOrPathString) ? fixFileProtocol(urlOrPathString)
                    : addFileProtocol(urlOrPathString);
            url = toURL(urlString);
        }
        return url;
    }

    private  UrlUtilities();

}