(String s)
| 413 | } |
| 414 | |
| 415 | private static String urlEncode(String s) { |
| 416 | try { |
| 417 | // Use standard form-urlencode then fix spaces to %20 (URLEncoder uses '+') |
| 418 | String enc = URLEncoder.encode(s, "UTF-8"); |
| 419 | return enc.replace("+", "%20"); |
| 420 | } catch (UnsupportedEncodingException e) { |
| 421 | throw new RuntimeException(e); |
| 422 | } |
| 423 | } |
| 424 | } |
no test coverage detected