@Test public void testPercentageEncoding() { assertEquals(Utf8UrlEncoder.percentEncodeQueryElement("foobar"), "foobar"); assertEquals(Utf8UrlEncoder.percentEncodeQueryElement("foo*bar"), "foo%2Abar"); assertEquals(Utf8UrlEncoder.percentEncodeQueryElement("foo~b_ar"), "foo~b_ar"); }
public static String percentEncodeQueryElement(String input) { if (input == null) { return null; } StringBuilder sb = new StringBuilder(input.length() + 6); encodeAndAppendPercentEncoded(sb, input); return sb.toString(); }
Utf8UrlEncoder { public static String percentEncodeQueryElement(String input) { if (input == null) { return null; } StringBuilder sb = new StringBuilder(input.length() + 6); encodeAndAppendPercentEncoded(sb, input); return sb.toString(); } }
Utf8UrlEncoder { public static String percentEncodeQueryElement(String input) { if (input == null) { return null; } StringBuilder sb = new StringBuilder(input.length() + 6); encodeAndAppendPercentEncoded(sb, input); return sb.toString(); } private  Utf8UrlEncoder(); }
Utf8UrlEncoder { public static String percentEncodeQueryElement(String input) { if (input == null) { return null; } StringBuilder sb = new StringBuilder(input.length() + 6); encodeAndAppendPercentEncoded(sb, input); return sb.toString(); } private  Utf8UrlEncoder(); static String encodePath(String input); static StringBuilder encodeAndAppendQuery(StringBuilder sb, String query); static String encodeQueryElement(String input); static StringBuilder encodeAndAppendQueryElement(StringBuilder sb, CharSequence input); static StringBuilder encodeAndAppendFormElement(StringBuilder sb, CharSequence input); static String percentEncodeQueryElement(String input); static StringBuilder encodeAndAppendPercentEncoded(StringBuilder sb, CharSequence input); }
Utf8UrlEncoder { public static String percentEncodeQueryElement(String input) { if (input == null) { return null; } StringBuilder sb = new StringBuilder(input.length() + 6); encodeAndAppendPercentEncoded(sb, input); return sb.toString(); } private  Utf8UrlEncoder(); static String encodePath(String input); static StringBuilder encodeAndAppendQuery(StringBuilder sb, String query); static String encodeQueryElement(String input); static StringBuilder encodeAndAppendQueryElement(StringBuilder sb, CharSequence input); static StringBuilder encodeAndAppendFormElement(StringBuilder sb, CharSequence input); static String percentEncodeQueryElement(String input); static StringBuilder encodeAndAppendPercentEncoded(StringBuilder sb, CharSequence input);  }