@Test public void testUrlEncode() { assertThat(EncodingUtil.urlEncode("simple"), is("simple")); assertThat(EncodingUtil.urlEncode("sim/ple"), is("sim%2Fple")); }
public static String urlEncode(final String string) { try { return URLEncoder.encode(string, UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new AssertionError("UTF-8 encoding is not supported on this system.", e); } }
EncodingUtil { public static String urlEncode(final String string) { try { return URLEncoder.encode(string, UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new AssertionError("UTF-8 encoding is not supported on this system.", e); } } }
EncodingUtil { public static String urlEncode(final String string) { try { return URLEncoder.encode(string, UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new AssertionError("UTF-8 encoding is not supported on this system.", e); } } private  EncodingUtil(); }
EncodingUtil { public static String urlEncode(final String string) { try { return URLEncoder.encode(string, UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new AssertionError("UTF-8 encoding is not supported on this system.", e); } } private  EncodingUtil(); static String urlEncode(final String string); static String urlDecode(final String string); static String[] urlDecode(final String... strings); }
EncodingUtil { public static String urlEncode(final String string) { try { return URLEncoder.encode(string, UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new AssertionError("UTF-8 encoding is not supported on this system.", e); } } private  EncodingUtil(); static String urlEncode(final String string); static String urlDecode(final String string); static String[] urlDecode(final String... strings);  }