if (bytes == null) { return null; } else if (encoding == null) { return urlEncode(bytes); } else if ("url".equals(encoding)) { return urlEncode(bytes); } else if ("hex".equals(encoding)) { return toHex(bytes); ...
if (id instanceof String) return URLEncoder.encode(id.toString()); else return id.toString();
try { return URLEncoder.encode(content, encoding != null ? encoding : "UTF-8"); } catch (UnsupportedEncodingException problem) { throw new IllegalArgumentException(problem);
try { return URLEncoder.encode(raw, "UTF-8"); } catch (final UnsupportedEncodingException e) { return raw;
Encode string with the encode character.
try { return URLEncoder.encode(s, enc); } catch (final UnsupportedEncodingException e) { throw new RuntimeException(e);
return encode(string, null);
try { return URLEncoder.encode(value, charset); } catch (UnsupportedEncodingException e) { throw new IllegalStateException(e);
if (map == null) { return null; StringBuilder str = new StringBuilder(); Set<String> keys = map.keySet(); boolean first = true; for (String key : keys) { Object value = map.get(key); ...
if (parameter == null) { return null; try { return URLEncoder.encode(parameter.toString(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e);
if (value == null) return ""; try { return URLEncoder.encode(value.toString(), "UTF-8"); } catch (UnsupportedEncodingException e) { return value.toString();