Package com.adobe.granite.rest.utils
Class URIUtils
java.lang.Object
com.adobe.granite.rest.utils.URIUtils
The
URIUtils provides helper methods around working with URIs.-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringrelativize(RequestPathInfo requestPathInfo, String resourcePath) Relativizes the specifiedresourcePathagainstrequestPathInfo.static StringurlEncodePath(String toEncode) URL encodes a path, ensuring that any forward slashes remain unencoded.
-
Method Details
-
urlEncodePath
URL encodes a path, ensuring that any forward slashes remain unencoded.- Parameters:
toEncode- The path to be safely URL encoded.- Returns:
- A URL-encoded version of the path.
-
relativize
Relativizes the specifiedresourcePathagainstrequestPathInfo.- Parameters:
requestPathInfo- RequestPathInfo to relativize againstresourcePath- Resource path to relativize- Returns:
- The resulting path
-