code: public static Map<URLParts, String> splitURL(String URLString) {
          try {
              return splitURL(new URL(URLString));
          } 
          catch (MalformedURLException ex) {
              throw new RuntimeException(ex);
          }
      }
docs: This method splits a URL into parts and return a map containing them.
  
  @param URLString
  @return