@Test public void rfc3986_queryEncodingNotRecommended() { assertEquals("-", PercentEncoder.encodeQueryComponent("-")); assertEquals(".", PercentEncoder.encodeQueryComponent(".")); assertEquals("_", PercentEncoder.encodeQueryComponent("_")); assertMaybeEncoded('~', PercentEncoder.encodeQueryComponent("~")); assertEquals("0", PercentEncoder.encodeQueryComponent("0")); assertEquals("1", PercentEncoder.encodeQueryComponent("1")); assertEquals("2", PercentEncoder.encodeQueryComponent("2")); assertEquals("3", PercentEncoder.encodeQueryComponent("3")); assertEquals("4", PercentEncoder.encodeQueryComponent("4")); assertEquals("5", PercentEncoder.encodeQueryComponent("5")); assertEquals("6", PercentEncoder.encodeQueryComponent("6")); assertEquals("7", PercentEncoder.encodeQueryComponent("7")); assertEquals("8", PercentEncoder.encodeQueryComponent("8")); assertEquals("9", PercentEncoder.encodeQueryComponent("9")); assertEquals("A", PercentEncoder.encodeQueryComponent("A")); assertEquals("B", PercentEncoder.encodeQueryComponent("B")); assertEquals("C", PercentEncoder.encodeQueryComponent("C")); assertEquals("D", PercentEncoder.encodeQueryComponent("D")); assertEquals("E", PercentEncoder.encodeQueryComponent("E")); assertEquals("F", PercentEncoder.encodeQueryComponent("F")); assertEquals("G", PercentEncoder.encodeQueryComponent("G")); assertEquals("H", PercentEncoder.encodeQueryComponent("H")); assertEquals("I", PercentEncoder.encodeQueryComponent("I")); assertEquals("J", PercentEncoder.encodeQueryComponent("J")); assertEquals("K", PercentEncoder.encodeQueryComponent("K")); assertEquals("L", PercentEncoder.encodeQueryComponent("L")); assertEquals("M", PercentEncoder.encodeQueryComponent("M")); assertEquals("N", PercentEncoder.encodeQueryComponent("N")); assertEquals("O", PercentEncoder.encodeQueryComponent("O")); assertEquals("P", PercentEncoder.encodeQueryComponent("P")); assertEquals("Q", PercentEncoder.encodeQueryComponent("Q")); assertEquals("R", PercentEncoder.encodeQueryComponent("R")); assertEquals("S", PercentEncoder.encodeQueryComponent("S")); assertEquals("T", PercentEncoder.encodeQueryComponent("T")); assertEquals("U", PercentEncoder.encodeQueryComponent("U")); assertEquals("V", PercentEncoder.encodeQueryComponent("V")); assertEquals("W", PercentEncoder.encodeQueryComponent("W")); assertEquals("X", PercentEncoder.encodeQueryComponent("X")); assertEquals("Y", PercentEncoder.encodeQueryComponent("Y")); assertEquals("Z", PercentEncoder.encodeQueryComponent("Z")); assertEquals("a", PercentEncoder.encodeQueryComponent("a")); assertEquals("b", PercentEncoder.encodeQueryComponent("b")); assertEquals("c", PercentEncoder.encodeQueryComponent("c")); assertEquals("d", PercentEncoder.encodeQueryComponent("d")); assertEquals("e", PercentEncoder.encodeQueryComponent("e")); assertEquals("f", PercentEncoder.encodeQueryComponent("f")); assertEquals("g", PercentEncoder.encodeQueryComponent("g")); assertEquals("h", PercentEncoder.encodeQueryComponent("h")); assertEquals("i", PercentEncoder.encodeQueryComponent("i")); assertEquals("j", PercentEncoder.encodeQueryComponent("j")); assertEquals("k", PercentEncoder.encodeQueryComponent("k")); assertEquals("l", PercentEncoder.encodeQueryComponent("l")); assertEquals("m", PercentEncoder.encodeQueryComponent("m")); assertEquals("n", PercentEncoder.encodeQueryComponent("n")); assertEquals("o", PercentEncoder.encodeQueryComponent("o")); assertEquals("p", PercentEncoder.encodeQueryComponent("p")); assertEquals("q", PercentEncoder.encodeQueryComponent("q")); assertEquals("r", PercentEncoder.encodeQueryComponent("r")); assertEquals("s", PercentEncoder.encodeQueryComponent("s")); assertEquals("t", PercentEncoder.encodeQueryComponent("t")); assertEquals("u", PercentEncoder.encodeQueryComponent("u")); assertEquals("v", PercentEncoder.encodeQueryComponent("v")); assertEquals("w", PercentEncoder.encodeQueryComponent("w")); assertEquals("x", PercentEncoder.encodeQueryComponent("x")); assertEquals("y", PercentEncoder.encodeQueryComponent("y")); assertEquals("z", PercentEncoder.encodeQueryComponent("z")); }
public static String encodeQueryComponent(String component) { return PercentEncoder.encode(component, safeQuery, true, false); }
PercentEncoder { public static String encodeQueryComponent(String component) { return PercentEncoder.encode(component, safeQuery, true, false); } }
PercentEncoder { public static String encodeQueryComponent(String component) { return PercentEncoder.encode(component, safeQuery, true, false); }  }
PercentEncoder { public static String encodeQueryComponent(String component) { return PercentEncoder.encode(component, safeQuery, true, 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 encodeQueryComponent(String component) { return PercentEncoder.encode(component, safeQuery, true, 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);  }