Class EncodingUtil
java.lang.Object
org.apache.maven.wagon.shared.http.EncodingUtil
Encoding utility.
- Since:
- 2.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URI
Deprecated.to be removed with 4.0.0static String
encodeURLToString
(String url) Deprecated.To be remvoed with 4.0.0static String
encodeURLToString
(String baseUrl, String path) Parses and returns an encoded version of the given URL string alongside the given path.static String
encodeURLToString
(String baseUrl, String... pathSegments) Parses and returns an encoded version of the given URL string alongside the given path segments.
-
Constructor Details
-
EncodingUtil
public EncodingUtil()
-
-
Method Details
-
encodeURL
@Deprecated public static URI encodeURL(String url) throws MalformedURLException, URISyntaxException Deprecated.to be removed with 4.0.0Parses and returns an encoded version of the given URL string.- Parameters:
url
- Raw/decoded string form of a URL to parse/encode.- Returns:
- Parsed/encoded
URI
that represents the string form URL passed in. - Throws:
MalformedURLException
URISyntaxException
-
encodeURLToString
Deprecated.To be remvoed with 4.0.0Parses and returns an encoded version of the given URL string. Wraps theMalformedURLException
andURISyntaxException
in case the passed URL is invalid.- Parameters:
url
- Raw/decoded string form of a URL to parse/encode.- Returns:
- Parsed/encoded URI (as string) that represents the
- Throws:
IllegalArgumentException
- in case the URL string is invalid.
-
encodeURLToString
Parses and returns an encoded version of the given URL string alongside the given path.- Parameters:
baseUrl
- Base URL to use when constructing the final URL. This has to be a valid URL already.path
- Additional unencoded path to append at the end of the base path.- Returns:
- Composed URL (base + path) already encoded, separating the individual path segments by "/".
- Since:
- TODO
-
encodeURLToString
Parses and returns an encoded version of the given URL string alongside the given path segments.- Parameters:
baseUrl
- Base URL to use when constructing the final URL. This has to be a valid URL already.pathSegments
- Additional unencoded path segments to append at the end of the base path.- Returns:
- Composed URL (base + path) already encoded, separating the individual path segments by "/".
- Since:
- TODO
-