Package nl.talsmasoftware.umldoclet.util
Class UriUtils
java.lang.Object
nl.talsmasoftware.umldoclet.util.UriUtils
Utility class for manipulating URI's
- Author:
- Sjoerd Talsma
-
Method Summary
Modifier and TypeMethodDescriptionstatic URI
addHttpParam(URI uri, String name, String value)
This method adds a query parameter to an existing URI and takes care of proper encoding etc.static URI
addPathComponent(URI uri, String component)
This method adds a 'component' to the path of an URI.
-
Method Details
-
addPathComponent
This method adds a 'component' to the path of an URI.- Parameters:
uri
- The URI to add a path component tocomponent
- The component to add to the end of the uri path, separated by a slash ('/'
) character- Returns:
- The new URI
-
addHttpParam
This method adds a query parameter to an existing URI and takes care of proper encoding etc.Since query parameters are scheme-specific, this method only applies to URI's with the following schemes:
"http"
"https"
- Parameters:
uri
- The URI to add an HTTP parameter toname
- The name of the parameter to addvalue
- The value of the parameter to add- Returns:
- The URI to which a parameter may have been added
-