Class PathUtils

java.lang.Object
org.eclipse.aether.transport.file.PathUtils

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

    • PathUtils

      private PathUtils()
  • Method Details

    • protocol

      public static String protocol(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 String basedir(String url)
      Derive the path portion of the given URL.
      Parameters:
      url - the file-repository URL
      Returns:
      the basedir of the repository
    • decode

      static String decode(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.