Class PathUtils


  • final class PathUtils
    extends java.lang.Object
    URL handling for file URLs. Based on org.apache.maven.wagon.PathUtils.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PathUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String basedir​(java.lang.String url)
      Derive the path portion of the given URL.
      (package private) static java.lang.String decode​(java.lang.String url)
      Decodes the specified (portion of a) URL.
      static java.lang.String protocol​(java.lang.String url)
      Return the protocol name.
      • Methods inherited from class java.lang.Object

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

      • PathUtils

        private PathUtils()
    • Method Detail

      • protocol

        public static java.lang.String protocol​(java.lang.String url)
        Return the protocol name.
        E.g: for input http://www.codehause.org this method will return http
        Parameters:
        url - the url
        Returns:
        the host name
      • basedir

        public static java.lang.String basedir​(java.lang.String url)
        Derive the path portion of the given URL.
        Parameters:
        url - the file-repository URL
        Returns:
        the basedir of the repository
      • decode

        static java.lang.String decode​(java.lang.String url)
        Decodes the specified (portion of a) URL. Note: This decoder assumes that ISO-8859-1 is used to convert URL-encoded octets to characters.
        Parameters:
        url - The URL to decode, may be null.
        Returns:
        The decoded URL or null if the input was null.