String (final String path, final int num) { final String[] pieces = path.split("/"); final StringBuilder sb = new StringBuilder(); for (int i = num; i < pieces.length; i++) { final String piece = pieces[i]; sb.append('/').append(piece); } return sb.toString(); }