public class URIUtils extends 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 | Method and Description |
|---|---|
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.
|
public static String encodePath(String unescaped) throws URISyntaxException
unescaped - an unescaped stringURISyntaxException - if the default protocol charset is not supportedpublic static String encodePath(String unescaped, String charset) throws URISyntaxException
unescaped - an unescaped stringcharset - the charsetURISyntaxException - if the charset is not supportedCopyright © 2002–2019 The Apache Software Foundation. All rights reserved.