@Test public void rfc3986_pathEncodingNotRecommended() { assertEquals("-", PercentEncoder.encodePathSegment("-")); assertEquals(".", PercentEncoder.encodePathSegment(".")); assertEquals("_", PercentEncoder.encodePathSegment("_")); assertEquals("~", PercentEncoder.encodePathSegment("~")); assertEquals("0", PercentEncoder.encodePathSegment("0")); assertEquals("1", PercentEncoder.encodePathSegment("1")); assertEquals("2", PercentEncoder.encodePathSegment("2")); assertEquals("3", PercentEncoder.encodePathSegment("3")); assertEquals("4", PercentEncoder.encodePathSegment("4")); assertEquals("5", PercentEncoder.encodePathSegment("5")); assertEquals("6", PercentEncoder.encodePathSegment("6")); assertEquals("7", PercentEncoder.encodePathSegment("7")); assertEquals("8", PercentEncoder.encodePathSegment("8")); assertEquals("9", PercentEncoder.encodePathSegment("9")); assertEquals("A", PercentEncoder.encodePathSegment("A")); assertEquals("B", PercentEncoder.encodePathSegment("B")); assertEquals("C", PercentEncoder.encodePathSegment("C")); assertEquals("D", PercentEncoder.encodePathSegment("D")); assertEquals("E", PercentEncoder.encodePathSegment("E")); assertEquals("F", PercentEncoder.encodePathSegment("F")); assertEquals("G", PercentEncoder.encodePathSegment("G")); assertEquals("H", PercentEncoder.encodePathSegment("H")); assertEquals("I", PercentEncoder.encodePathSegment("I")); assertEquals("J", PercentEncoder.encodePathSegment("J")); assertEquals("K", PercentEncoder.encodePathSegment("K")); assertEquals("L", PercentEncoder.encodePathSegment("L")); assertEquals("M", PercentEncoder.encodePathSegment("M")); assertEquals("N", PercentEncoder.encodePathSegment("N")); assertEquals("O", PercentEncoder.encodePathSegment("O")); assertEquals("P", PercentEncoder.encodePathSegment("P")); assertEquals("Q", PercentEncoder.encodePathSegment("Q")); assertEquals("R", PercentEncoder.encodePathSegment("R")); assertEquals("S", PercentEncoder.encodePathSegment("S")); assertEquals("T", PercentEncoder.encodePathSegment("T")); assertEquals("U", PercentEncoder.encodePathSegment("U")); assertEquals("V", PercentEncoder.encodePathSegment("V")); assertEquals("W", PercentEncoder.encodePathSegment("W")); assertEquals("X", PercentEncoder.encodePathSegment("X")); assertEquals("Y", PercentEncoder.encodePathSegment("Y")); assertEquals("Z", PercentEncoder.encodePathSegment("Z")); assertEquals("a", PercentEncoder.encodePathSegment("a")); assertEquals("b", PercentEncoder.encodePathSegment("b")); assertEquals("c", PercentEncoder.encodePathSegment("c")); assertEquals("d", PercentEncoder.encodePathSegment("d")); assertEquals("e", PercentEncoder.encodePathSegment("e")); assertEquals("f", PercentEncoder.encodePathSegment("f")); assertEquals("g", PercentEncoder.encodePathSegment("g")); assertEquals("h", PercentEncoder.encodePathSegment("h")); assertEquals("i", PercentEncoder.encodePathSegment("i")); assertEquals("j", PercentEncoder.encodePathSegment("j")); assertEquals("k", PercentEncoder.encodePathSegment("k")); assertEquals("l", PercentEncoder.encodePathSegment("l")); assertEquals("m", PercentEncoder.encodePathSegment("m")); assertEquals("n", PercentEncoder.encodePathSegment("n")); assertEquals("o", PercentEncoder.encodePathSegment("o")); assertEquals("p", PercentEncoder.encodePathSegment("p")); assertEquals("q", PercentEncoder.encodePathSegment("q")); assertEquals("r", PercentEncoder.encodePathSegment("r")); assertEquals("s", PercentEncoder.encodePathSegment("s")); assertEquals("t", PercentEncoder.encodePathSegment("t")); assertEquals("u", PercentEncoder.encodePathSegment("u")); assertEquals("v", PercentEncoder.encodePathSegment("v")); assertEquals("w", PercentEncoder.encodePathSegment("w")); assertEquals("x", PercentEncoder.encodePathSegment("x")); assertEquals("y", PercentEncoder.encodePathSegment("y")); assertEquals("z", PercentEncoder.encodePathSegment("z")); }
public static String encodePathSegment(String segment) { return PercentEncoder.encode(segment, safePath, false, false); }
PercentEncoder { public static String encodePathSegment(String segment) { return PercentEncoder.encode(segment, safePath, false, false); } }
PercentEncoder { public static String encodePathSegment(String segment) { return PercentEncoder.encode(segment, safePath, false, false); }  }
PercentEncoder { public static String encodePathSegment(String segment) { return PercentEncoder.encode(segment, safePath, false, false); }  static String encodePathSegment(String segment); static String encodeQueryComponent(String component); static String encodeQueryComponentNoPlusForSpace(String component); static String encodeFragment(String fragment); static String reEncodePath(String path); static String reEncodeQuery(String query); static String reEncodeFragment(String fragment); }
PercentEncoder { public static String encodePathSegment(String segment) { return PercentEncoder.encode(segment, safePath, false, false); }  static String encodePathSegment(String segment); static String encodeQueryComponent(String component); static String encodeQueryComponentNoPlusForSpace(String component); static String encodeFragment(String fragment); static String reEncodePath(String path); static String reEncodeQuery(String query); static String reEncodeFragment(String fragment);  }