code: public static String combineToPath(List<String> pParts) {
          if (pParts != null && pParts.size() > 0) {
              StringBuilder buf = new StringBuilder();
              Iterator<String> it = pParts.iterator();
              while (it.hasNext()) {
                  String part = it.next();
                  buf.append(escapePart(part != null ? part : "*"));
                  if (it.hasNext()) {
                      buf.append("/");
                  }
              }
              return buf.toString();
          } else {
              return null;
          }
      }
docs: Combine a list of strings to a single path with proper escaping.
  
  @param pParts parts to combine
  @return the combined path