code: public static String[] splitName(final String href) {
      if ((href == null) || (href.length() == 0)) {
        return null;
      }
  
      final String stripped;
  
      if (href.endsWith("/")) {
        stripped = href.substring(0, href.length() - 1);
      } else {
        stripped = href;
      }
  
      final int pos = stripped.lastIndexOf("/");
  
      if (pos <= 0) {
        return null;
      }
  
      return new String[]{stripped.substring(0, pos),
                          stripped.substring(pos + 1)};
    }
docs: if an href with terminating "/" the name part is that between the
  ending "/" and the one before.
  
  <p>Otherwise it's the part after the last "/"</p>
  
  @param href to split
  @return name split into path and name part