Package com.sun.identity.shared.encode
Class URLEncDec
- java.lang.Object
-
- com.sun.identity.shared.encode.URLEncDec
-
public class URLEncDec extends Object
-
-
Constructor Summary
Constructors Constructor Description URLEncDec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdecode(String s)Decodes aapplication/x-www-form-urlencodedstring using the UTF-8 encoding scheme.static Stringencode(String s)Translates a string intoapplication/x-www-form-urlencodedformat using the UTF-8 encoding scheme.static StringencodeLDAPUrl(String s)static StringencodeUrlPath(String u)
-
-
-
Method Detail
-
encode
public static String encode(String s)
Translates a string intoapplication/x-www-form-urlencodedformat using the UTF-8 encoding scheme. The World Wide Web Consortium Recommendation states that UTF-8 should be used to ensure compatibilities.- Parameters:
s-Stringto be translated.- Returns:
- the translated
String.
-
decode
public static String decode(String s)
Decodes aapplication/x-www-form-urlencodedstring using the UTF-8 encoding scheme. The World Wide Web Consortium Recommendation states that UTF-8 should be used to ensure compatibilities.- Parameters:
s- theStringto decode- Returns:
- the newly decoded
String
-
encodeUrlPath
public static String encodeUrlPath(String u) throws MalformedURLException
- Throws:
MalformedURLException
-
-