Package com.atlassian.confluence.util
Class CompleteURLEncoder
- java.lang.Object
-
- com.atlassian.confluence.util.CompleteURLEncoder
-
public class CompleteURLEncoder extends Object
This class caters for encoding of url strings for the following protocols: - file - http (see RFC 2396 for reference)The url strings passed in are converted into Java URI objects as it automatically does the encoding. Note we cannot simply use Java's URLEncoder as it is only for HTML form encoding and does not cater for the entire url.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE_PROTOCOL
-
Constructor Summary
Constructors Constructor Description CompleteURLEncoder()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
encode(String urlString, String enc)
Deprecated.since 8.7 useencode(String, Charset)
static String
encode(String urlString, Charset enc)
-
-
-
Field Detail
-
FILE_PROTOCOL
public static final String FILE_PROTOCOL
- See Also:
- Constant Field Values
-
-
Method Detail
-
encode
@Deprecated public static String encode(String urlString, String enc) throws MalformedURLException, UnsupportedEncodingException
Deprecated.since 8.7 useencode(String, Charset)
-
encode
public static String encode(String urlString, Charset enc) throws MalformedURLException
- Throws:
MalformedURLException
- Since:
- 8.7
-
-