@Test public void rfc3986_queryEncodingRequired() { assertEquals("%00", PercentEncoder.encodeQueryComponent("\u0000")); assertEquals("%01", PercentEncoder.encodeQueryComponent("\u0001")); assertEquals("%02", PercentEncoder.encodeQueryComponent("\u0002")); assertEquals("%03", PercentEncoder.encodeQueryComponent("\u0003")); assertEquals("%04", PercentEncoder.encodeQueryComponent("\u0004")); assertEquals("%05", PercentEncoder.encodeQueryComponent("\u0005")); assertEquals("%06", PercentEncoder.encodeQueryComponent("\u0006")); assertEquals("%07", PercentEncoder.encodeQueryComponent("\u0007")); assertEquals("%08", PercentEncoder.encodeQueryComponent("\u0008")); assertEquals("%09", PercentEncoder.encodeQueryComponent("\u0009")); assertEquals("%0A", PercentEncoder.encodeQueryComponent("\n")); assertEquals("%0B", PercentEncoder.encodeQueryComponent("\u000b")); assertEquals("%0C", PercentEncoder.encodeQueryComponent("\u000c")); assertEquals("%0D", PercentEncoder.encodeQueryComponent("\r")); assertEquals("%0E", PercentEncoder.encodeQueryComponent("\u000e")); assertEquals("%0F", PercentEncoder.encodeQueryComponent("\u000f")); assertEquals("%10", PercentEncoder.encodeQueryComponent("\u0010")); assertEquals("%11", PercentEncoder.encodeQueryComponent("\u0011")); assertEquals("%12", PercentEncoder.encodeQueryComponent("\u0012")); assertEquals("%13", PercentEncoder.encodeQueryComponent("\u0013")); assertEquals("%14", PercentEncoder.encodeQueryComponent("\u0014")); assertEquals("%15", PercentEncoder.encodeQueryComponent("\u0015")); assertEquals("%16", PercentEncoder.encodeQueryComponent("\u0016")); assertEquals("%17", PercentEncoder.encodeQueryComponent("\u0017")); assertEquals("%18", PercentEncoder.encodeQueryComponent("\u0018")); assertEquals("%19", PercentEncoder.encodeQueryComponent("\u0019")); assertEquals("%1A", PercentEncoder.encodeQueryComponent("\u001a")); assertEquals("%1B", PercentEncoder.encodeQueryComponent("\u001b")); assertEquals("%1C", PercentEncoder.encodeQueryComponent("\u001c")); assertEquals("%1D", PercentEncoder.encodeQueryComponent("\u001d")); assertEquals("%1E", PercentEncoder.encodeQueryComponent("\u001e")); assertEquals("%1F", PercentEncoder.encodeQueryComponent("\u001f")); assertEquals("+", PercentEncoder.encodeQueryComponent("\u0020")); assertEquals("%22", PercentEncoder.encodeQueryComponent("\"")); assertEquals("%23", PercentEncoder.encodeQueryComponent("#")); assertEquals("%25", PercentEncoder.encodeQueryComponent("%")); assertEquals("%3C", PercentEncoder.encodeQueryComponent("<")); assertEquals("%3E", PercentEncoder.encodeQueryComponent(">")); assertEquals("%5B", PercentEncoder.encodeQueryComponent("[")); assertEquals("%5C", PercentEncoder.encodeQueryComponent("\\")); assertEquals("%5D", PercentEncoder.encodeQueryComponent("]")); assertEquals("%5E", PercentEncoder.encodeQueryComponent("^")); assertEquals("%60", PercentEncoder.encodeQueryComponent("`")); assertEquals("%7B", PercentEncoder.encodeQueryComponent("{")); assertEquals("%7C", PercentEncoder.encodeQueryComponent("|")); assertEquals("%7D", PercentEncoder.encodeQueryComponent("}")); assertEquals("%7F", PercentEncoder.encodeQueryComponent("\u007f")); }
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);  }