public class URIUtil extends Object
| Constructor | Description |
|---|---|
URIUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static String |
decode(String escaped) |
Unescape and decode a given string regarded as an escaped string with the
default protocol charset.
|
static String |
decode(String escaped,
String charset) |
Unescape and decode a given string regarded as an escaped string.
|
static String |
encode(String unescaped,
BitSet allowed) |
Escape and encode a given string with allowed characters not to be
escaped and the default protocol charset.
|
static String |
encode(String unescaped,
BitSet allowed,
String charset) |
Escape and encode a given string with allowed characters not to be
escaped and a given charset.
|
static String |
encodeQuery(String unescaped) |
Escape and encode a string regarded as the query component of an URI with
the default protocol charset.
|
static String |
encodeQuery(String unescaped,
String charset) |
Escape and encode a string regarded as the query component of an URI with
a given charset.
|
public static String encodeQuery(String unescaped) throws org.apache.http.HttpException
unescaped - an unescaped stringorg.apache.http.HttpException - if the default protocol charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encodeQuery(String unescaped, String charset) throws org.apache.http.HttpException
unescaped - an unescaped stringcharset - the charsetorg.apache.http.HttpException - if the charset is not supportedencode(java.lang.String, java.util.BitSet)public static String encode(String unescaped, BitSet allowed) throws org.apache.http.HttpException
unescaped - a stringallowed - allowed characters not to be escapedorg.apache.http.HttpException - if the default protocol charset is not supportedpublic static String encode(String unescaped, BitSet allowed, String charset) throws org.apache.http.HttpException
unescaped - a stringallowed - allowed characters not to be escapedcharset - the charsetorg.apache.http.HttpExceptionpublic static String decode(String escaped) throws org.apache.http.HttpException
escaped - a stringorg.apache.http.HttpException - if the string cannot be decoded (invalid)public static String decode(String escaped, String charset) throws org.apache.http.HttpException
escaped - a stringcharset - the charsetorg.apache.http.HttpException - if the charset is not supported