Class EncodingUtil
- java.lang.Object
-
- org.apache.maven.wagon.shared.http.EncodingUtil
-
public class EncodingUtil extends java.lang.Object
Encoding utility.- Since:
- 2.7
-
-
Constructor Summary
Constructors Constructor Description EncodingUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.net.URI
encodeURL(java.lang.String url)
Deprecated.to be removed with 4.0.0static java.lang.String
encodeURLToString(java.lang.String url)
Deprecated.To be remvoed with 4.0.0static java.lang.String
encodeURLToString(java.lang.String baseUrl, java.lang.String path)
Parses and returns an encoded version of the given URL string alongside the given path.static java.lang.String
encodeURLToString(java.lang.String baseUrl, java.lang.String... pathSegments)
Parses and returns an encoded version of the given URL string alongside the given path segments.
-
-
-
Method Detail
-
encodeURL
@Deprecated public static java.net.URI encodeURL(java.lang.String url) throws java.net.MalformedURLException, java.net.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:
java.net.MalformedURLException
java.net.URISyntaxException
-
encodeURLToString
@Deprecated public static java.lang.String encodeURLToString(java.lang.String url)
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:
java.lang.IllegalArgumentException
- in case the URL string is invalid.
-
encodeURLToString
public static java.lang.String encodeURLToString(java.lang.String baseUrl, java.lang.String path)
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
public static java.lang.String encodeURLToString(java.lang.String baseUrl, java.lang.String... pathSegments)
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
-
-