UriComponent { public static List<PathSegment> decodePath(final URI u, final boolean decode) { String rawPath = u.getRawPath(); if (rawPath != null && rawPath.length() > 0 && rawPath.charAt(0) == '/') { rawPath = rawPath.substring(1); } return decodePath(rawPath, decode); } private  UriComponent(); static void validate(final String s, final Type t); static void validate(final String s, final Type t, final boolean template); static boolean valid(final String s, final Type t); static boolean valid(final String s, final Type t, final boolean template); static String contextualEncode(final String s, final Type t); static String contextualEncode(final String s, final Type t, final boolean template); static String encode(final String s, final Type t); static String encode(final String s, final Type t, final boolean template); static String encodeTemplateNames(String s); static String decode(final String s, final Type t); static MultivaluedMap<String, String> decodeQuery(final URI u, final boolean decode); static MultivaluedMap<String, String> decodeQuery(final String q, final boolean decode); static MultivaluedMap<String, String> decodeQuery(final String q, final boolean decodeNames,
                                                             final boolean decodeValues); static List<PathSegment> decodePath(final URI u, final boolean decode); static List<PathSegment> decodePath(final String path, final boolean decode); static void decodePathSegment(final List<PathSegment> segments, final String segment, final boolean decode); static MultivaluedMap<String, String> decodeMatrix(final String pathSegment, final boolean decode); static boolean isHexCharacter(final char c); static String fullRelativeUri(final URI uri);  }
@Test public void testDecodePath() { _testDecodePath("a", "a"); _testDecodePath("/a", "", "a"); _testDecodePath("/a/", "", "a", ""); _testDecodePath("/a _testDecodePath("/a _testDecodePath("a/b/c", "a", "b", "c"); _testDecodePath("a _testDecodePath(" _testDecodePath(" }