String (String... paths) { final StringBuilder builder = new StringBuilder(); for (String path : paths) { if (path.length() == 0) continue; final int len = builder.length(); if (len > 0 && builder.charAt(len - 1) != '/' && builder.charAt(len - 1) != File.separatorChar) { builder.append('/'); } builder.append(len != 0 ? trimForwardSlashes(path) : path); } return builder.toString(); }