Escapes and encodes the specified string. Based on HttpClient 3.1's URIUtil.encode() method. @param unescaped the string to encode @param allowed allowed characters that shouldn't be escaped @param charset the charset to use @return the escaped string
(final String unescaped, final BitSet allowed, final Charset charset)
| 363 | * @return the escaped string |
| 364 | */ |
| 365 | private static String encode(final String unescaped, final BitSet allowed, final Charset charset) { |
| 366 | final byte[] bytes = unescaped.getBytes(charset); |
| 367 | final byte[] bytes2 = encodeUrl(allowed, bytes); |
| 368 | return encodePercentSign(bytes2); |
| 369 | } |
| 370 | |
| 371 | /** |
| 372 | * Encodes every occurrence of the escape character '%' in the given input |
no test coverage detected