(String s)
| 1586 | * component s @return java.lang.String the converted string |
| 1587 | */ |
| 1588 | private String encodeOthers(String s) { |
| 1589 | try { |
| 1590 | /* |
| 1591 | * Use a different encoder than URLEncoder since: 1. chars like "/", |
| 1592 | * "#", "@" etc needs to be preserved instead of being encoded, 2. |
| 1593 | * UTF-8 char set needs to be used for encoding instead of default |
| 1594 | * platform one 3. Only other chars need to be converted |
| 1595 | */ |
| 1596 | return URIEncoderDecoder.encodeOthers(s); |
| 1597 | } catch (UnsupportedEncodingException e) { |
| 1598 | throw new RuntimeException(e.toString()); |
| 1599 | } |
| 1600 | } |
| 1601 | |
| 1602 | private String decode(String s) { |
| 1603 | if (s == null) { |
no test coverage detected