Package com.ardor3d.util
Class UrlUtils
java.lang.Object
com.ardor3d.util.UrlUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL
resolveRelativeURL
(URL primaryUrl, String relativeLoc) Create a new URL by resolving a given relative string (such as "mydir/myfile.ext") against a given url (such as "http://www.company.com/mycontent/content.html").
-
Constructor Details
-
UrlUtils
public UrlUtils()
-
-
Method Details
-
resolveRelativeURL
public static URL resolveRelativeURL(URL primaryUrl, String relativeLoc) throws MalformedURLException, URISyntaxException Create a new URL by resolving a given relative string (such as "mydir/myfile.ext") against a given url (such as "http://www.company.com/mycontent/content.html"). This method is necessary because new URL(URL, String) does not handle primaryUrls that contain %2F instead of a slash.- Parameters:
primaryUrl
- the primary or base URL.relativeLoc
- a String representing a relative file or path to resolve against the primary URL.- Returns:
- the resolved URL.
- Throws:
MalformedURLException
- if we are unable to create the URL.URISyntaxException
-