public class URIUtils
extends java.lang.Object
This was forked from some needed methods such as #encodePath(...) in org.apache.commons.httpclient.util.URIUtil,
in order to not be dependent on HttpClient v3 API, when generating and handling GenericURLFileNames,
but it should work with any different HTTP backend provider implementations.
| Modifier and Type | Class and Description |
|---|---|
private static class |
URIUtils.EncodingUtils
Internal character encoding utilities.
|
private static class |
URIUtils.URLCodecUtils
Internal URL codec utilities.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
DEFAULT_PROTOCOL_CHARSET
The default charset of the protocol.
|
private static org.apache.commons.logging.Log |
LOG |
| Modifier | Constructor and Description |
|---|---|
private |
URIUtils() |
| Modifier and Type | Method and Description |
|---|---|
private static java.lang.String |
encode(java.lang.String unescaped,
java.util.BitSet allowed,
java.lang.String charset) |
static java.lang.String |
encodePath(java.lang.String unescaped)
Escape and encode a string regarded as the path component of an URI with
the default protocol charset.
|
static java.lang.String |
encodePath(java.lang.String unescaped,
java.lang.String charset)
Escape and encode a string regarded as the path component of an URI with
a given charset.
|
private static final org.apache.commons.logging.Log LOG
private static final java.lang.String DEFAULT_PROTOCOL_CHARSET
public static java.lang.String encodePath(java.lang.String unescaped)
throws java.net.URISyntaxException
unescaped - an unescaped stringjava.net.URISyntaxException - if the default protocol charset is not supportedpublic static java.lang.String encodePath(java.lang.String unescaped,
java.lang.String charset)
throws java.net.URISyntaxException
unescaped - an unescaped stringcharset - the charsetjava.net.URISyntaxException - if the charset is not supportedprivate static java.lang.String encode(java.lang.String unescaped,
java.util.BitSet allowed,
java.lang.String charset)
throws java.net.URISyntaxException
java.net.URISyntaxException