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