Class URIUtilities


  • public class URIUtilities
    extends Object
    Utility class in order to manage URI
    Author:
    Nicolas Fortin
    • Constructor Detail

      • URIUtilities

        public URIUtilities()
    • Method Detail

      • getConcatenatedParameters

        public static String getConcatenatedParameters​(Map<String,​String> parameters,
                                                       String... keys)
        Create the Query part of an URI
        Parameters:
        parameters - Parameters to read
        keys - map property to read
        Returns:
        Query part of an URI
      • relativize

        public static URI relativize​(URI base,
                                     URI target)
        Enhanced version of URI.relativize, the target can now be in parent folder of base URI.
        Parameters:
        base - Base uri, location from where to relativize.
        target - Target uri, final destination of returned URI.
        Returns:
        Non-absolute URI, or target if target scheme is different than base scheme.
      • fileFromString

        public static File fileFromString​(String fileName)
        Get a File from the specified file name.
        Parameters:
        fileName - File name using Path or URI
        Returns:
        File path