Package org.swisspush.gateleen.core.http
Class UriBuilder
- java.lang.Object
-
- org.swisspush.gateleen.core.http.UriBuilder
-
public class UriBuilder extends Object
Helper Class for URI manipulations
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcleanUri(String uri)Clean the given URI from any multi slash delimiters in between uri segmentsstatic StringconcatUriSegments(String... segments)Concatenates multple URI segments in a save way and makes sure that only one slash is in between each
-
-
-
Method Detail
-
concatUriSegments
public static String concatUriSegments(String... segments)
Concatenates multple URI segments in a save way and makes sure that only one slash is in between each- Parameters:
segments- URI segments to put together in a valid manner- Returns:
- The concatenated resulting Uri
-
cleanUri
public static String cleanUri(String uri)
Clean the given URI from any multi slash delimiters in between uri segmentsDANGER: This method applies a regular expression against the given uri and this takes some resources of course. Do think twice before using this method.
- Parameters:
uri- to be cleaned from possible multi slash delimiters- Returns:
- The cleaned uri
-
-