org.apache.commons.httpclient.util
public class URIUtil extends Object
Version: $Revision: 155418 $ $Date: 2002/03/14 15:14:01
Nested Class Summary | |
---|---|
protected static class | URIUtil.Coder
The basic and internal utility for URI escape and character encoding and
decoding.
|
Field Summary | |
---|---|
protected static BitSet | empty |
Method Summary | |
---|---|
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 | encodeAll(String unescaped)
Get the all escaped and encoded string with the default protocl charset.
|
static String | encodeAll(String unescaped, String charset)
Get the all escaped and encoded string with a given charset.
|
static String | encodePath(String unescaped)
Escape and encode a string regarded as the path component of an URI with
the default protocol charset.
|
static String | encodePath(String unescaped, String charset)
Escape and encode a string regarded as the path component of an URI with
a given charset.
|
static String | encodePathQuery(String unescaped)
Escape and encode a string regarded as the path and query components of
an URI with the default protocol charset.
|
static String | encodePathQuery(String unescaped, String charset)
Escape and encode a string regarded as the path and query components of
an URI with 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.
|
static String | encodeWithinAuthority(String unescaped)
Escape and encode a string regarded as within the authority component of
an URI with the default protocol charset.
|
static String | encodeWithinAuthority(String unescaped, String charset)
Escape and encode a string regarded as within the authority component of
an URI with a given charset.
|
static String | encodeWithinPath(String unescaped)
Escape and encode a string regarded as within the path component of an
URI with the default protocol charset.
|
static String | encodeWithinPath(String unescaped, String charset)
Escape and encode a string regarded as within the path component of an
URI with a given charset.
|
static String | encodeWithinQuery(String unescaped)
Escape and encode a string regarded as within the query component of an
URI with the default protocol charset.
|
static String | encodeWithinQuery(String unescaped, String charset)
Escape and encode a string regarded as within the query component of an
URI with a given charset.
|
static String | getFromPath(String uri)
Get the path of an URI and its rest part.
|
static String | getName(String uri)
Get the basename of an URI. |
static String | getPath(String uri)
Get the path of an URI.
|
static String | getPathQuery(String uri)
Get the path and query of an URI.
|
static String | getQuery(String uri)
Get the query of an URI.
|
Parameters: escaped a string
Returns: the unescaped string
Throws: URIException if the string cannot be decoded (invalid)
See Also: URI
Parameters: escaped a string charset the charset
Returns: the unescaped string
Throws: URIException if the charset is not supported
See Also: Coder
Parameters: unescaped a string allowed allowed characters not to be escaped
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
See Also: URI
Parameters: unescaped a string allowed allowed characters not to be escaped charset the charset
Returns: the escaped string
encode(String unescaped, Bitset
empty, URI.getDefaultProtocolCharset())
.
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
encode(String unescaped, Bitset
empty, String charset)
.
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: unescaped an unescaped string
Returns: the escaped string
Throws: URIException if the default protocol charset is not supported
Parameters: unescaped an unescaped string charset the charset
Returns: the escaped string
Throws: URIException if the charset is not supported
See Also: URIUtil
Parameters: uri a string regarded an URI
Returns: the string from the path part
Parameters: uri a string regarded an URI
Returns: the basename string; an empty string if the path ends with slash
Parameters: uri a string regarded an URI
Returns: the path string
Parameters: uri a string regarded an URI
Returns: the path and query string
Parameters: uri a string regarded an URI
Returns: the query string; null
if empty or undefined