text: public static String pathToString(String[] path, int length) {if (length == 0) {return "";}StringBuilder sb = new StringBuilder();for(int i=0;i<length;i++) {String s = path[i];if (s.length() == 0) {throw new IllegalArgumentException("each path component must have length > 0 (got: \"\")");}int numChars = s.length();for(int j=0;j<numChars;j++) {char ch = s.charAt(j);if (ch == DELIM_CHAR || ch == ESCAPE_CHAR) {sb.append(ESCAPE_CHAR);}sb.append(ch);}sb.append(DELIM_CHAR);}sb.setLength(sb.length()-1);return sb.toString();}