Package nva.commons.core.paths
Class UriWrapper
java.lang.Object
nva.commons.core.paths.UriWrapper
Class for easily building and manipulating URIs. Tools to easily append paths and not have to deal with checking
whether the path delimiter is present or not.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUriWrapper(String uri) Deprecated, for removal: This API element is subject to removal in a future version.UriWrapper(String scheme, String host) UriWrapper(URI uri) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionAppends a path to the URI.addQueryParameter(String param, String value) addQueryParameters(Map<String, String> parameters) static UriWrapperstatic UriWrapperstatic UriWrapperstatic UriWrapperDeprecated.User getLastPathElementgetHost()getPath()getUri()replacePathElementByIndexFromEnd(int index, String replacement) toString()
-
Field Details
-
EMPTY_FRAGMENT
-
EMPTY_PATH
-
EMPTY_USER_INFO
-
EMPTY_QUERY
-
MISSING_HOST
- See Also:
-
HTTPS
- See Also:
-
NULL_INPUT_ERROR
- See Also:
-
-
Constructor Details
-
UriWrapper
Deprecated, for removal: This API element is subject to removal in a future version. -
UriWrapper
Deprecated, for removal: This API element is subject to removal in a future version.Use the static callfromUri(String)instead.Utility for working with URIs in a consistent manner.- Parameters:
uri- the URI string
-
UriWrapper
-
-
Method Details
-
fromUri
-
fromUri
-
fromHost
-
fromHost
-
getUri
-
getHost
-
addChild
-
addChild
Appends a path to the URI.- Parameters:
childPath- the path to be appended.- Returns:
- a UriWrapper containing the whole path.
-
replacePathElementByIndexFromEnd
-
toS3bucketPath
-
getPath
-
getParent
-
getLastPathElement
-
getFilename
Deprecated.User getLastPathElementReturns the last element from the URI path.- Returns:
- element.
-
addQueryParameter
-
addQueryParameters
-
toString
-
fromUri(String)instead.