public class EncodingUtil extends Object
Constructor and Description |
---|
EncodingUtil() |
Modifier and Type | Method and Description |
---|---|
static URI |
encodeURL(String url)
Deprecated.
to be removed with 4.0.0
|
static String |
encodeURLToString(String url)
Deprecated.
To be remvoed with 4.0.0
|
static String |
encodeURLToString(String baseUrl,
String... pathSegments)
Parses and returns an encoded version of the given URL string alongside the given path segments.
|
static String |
encodeURLToString(String baseUrl,
String path)
Parses and returns an encoded version of the given URL string alongside the given path.
|
public EncodingUtil()
@Deprecated public static URI encodeURL(String url) throws MalformedURLException, URISyntaxException
url
- Raw/decoded string form of a URL to parse/encode.URI
that represents the string form URL passed in.MalformedURLException
URISyntaxException
@Deprecated public static String encodeURLToString(String url)
MalformedURLException
and URISyntaxException
in case the passed URL is invalid.url
- Raw/decoded string form of a URL to parse/encode.IllegalArgumentException
- in case the URL string is invalid.public static String encodeURLToString(String baseUrl, String path)
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.public static String encodeURLToString(String baseUrl, String... pathSegments)
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.Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.