Class UriBuilder


  • public class UriBuilder
    extends java.lang.Object
    Helper Class for URI manipulations
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String cleanUri​(java.lang.String uri)
      Clean the given URI from any multi slash delimiters in between uri segments
      static java.lang.String concatUriSegments​(java.lang.String... segments)
      Concatenates multple URI segments in a save way and makes sure that only one slash is in between each
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • concatUriSegments

        public static java.lang.String concatUriSegments​(java.lang.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 java.lang.String cleanUri​(java.lang.String uri)
        Clean the given URI from any multi slash delimiters in between uri segments

        DANGER: 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