code: private int tokenize(StringBuilder sb, String path, int index){
          String[] tokens = path.split("/");
          for (String s: tokens) {
              if (s.length()==0)
                  continue;
              sb.append("name").append(index++)
                      .append("=").append(s).append(",");
          }
          return index;
      }
docs: This takes a path, such as /a/b/c, and converts it to
  name0=a,name1=b,name2=c