Package org.opencastproject.util
Class UrlSupport
java.lang.Object
org.opencastproject.util.UrlSupport
UrlSupport is a helper class to deal with urls.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringConcatenates the urls with respect to leading and trailing slashes.static StringConcatenates the two urls with respect to leading and trailing slashes.static StringConcatenates the two urls with respect to leading and trailing slashes.static StringConcatenates the urls with respect to leading and trailing slashes.static StringremoveDoubleSeparator(String path) Removes any occurrence of double separators ("//") and replaces it with "/".static URICreate a URI from the given parts.static URIURI constructor function without checked exceptions.static URLURL constructor function without checked exceptions.static URLURL constructor function without checked exceptions.static URLURL constructor function without checked exceptions.
-
Field Details
-
DEFAULT_BASE_URL
- See Also:
-
-
Method Details
-
uri
URI constructor function without checked exceptions. -
url
URL constructor function without checked exceptions. -
url
URL constructor function without checked exceptions. -
url
URL constructor function without checked exceptions.- See Also:
-
concat
Concatenates the two urls with respect to leading and trailing slashes.Note that returned path will only end with a slash if
suffixdoes. If you need a trailing slash, seeconcat(String, String, boolean).- Returns:
- the concatenated url of the two arguments
-
concat
Concatenates the two urls with respect to leading and trailing slashes. The path will always end with a trailing slash.- Returns:
- the concatenated url of the two arguments
-
concat
Concatenates the urls with respect to leading and trailing slashes.- Parameters:
parts- the parts to concat- Returns:
- the concatenated url
-
concat
Concatenates the urls with respect to leading and trailing slashes.- Parameters:
parts- the parts to concat- Returns:
- the concatenated url
-
uri
Create a URI from the given parts. -
removeDoubleSeparator
Removes any occurrence of double separators ("//") and replaces it with "/". Any double separators right after the protocol part are left untouched so that, e.g. http://localhost stays http://localhost- Parameters:
path- the path to check- Returns:
- the corrected path
-