Package org.apache.commons.vfs2.util
Class URIUtils
java.lang.Object
org.apache.commons.vfs2.util.URIUtils
The URI escape and character encoding and decoding utility.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classInternal character encoding utilities.private static classInternal URL codec utilities. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe default charset of the protocol.private static final org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringstatic StringencodePath(String unescaped) Escape and encode a string regarded as the path component of an URI with the default protocol charset.static StringencodePath(String unescaped, String charset) Escape and encode a string regarded as the path component of an URI with a given charset.
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
DEFAULT_PROTOCOL_CHARSET
The default charset of the protocol. RFC 2277, 2396- See Also:
-
-
Constructor Details
-
URIUtils
private URIUtils()
-
-
Method Details
-
encode
-
encodePath
Escape and encode a string regarded as the path component of an URI with the default protocol charset.- Parameters:
unescaped- an unescaped string- Returns:
- the escaped string
-
encodePath
Escape and encode a string regarded as the path component of an URI with a given charset.- Parameters:
unescaped- an unescaped stringcharset- the charset- Returns:
- the escaped string
-