Package com.sun.identity.sm.flatfile
Class FileNameDecoder
- java.lang.Object
-
- com.sun.identity.sm.flatfile.FileNameDecoder
-
public class FileNameDecoder extends Object
Same as URLDecoder except '+' is not decoded into a ' '.- See Also:
FileNameEncoder
-
-
Constructor Summary
Constructors Constructor Description FileNameDecoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdecode(String s)Decodes ax-www-form-urlencodedstring.static Stringdecode(String s, String enc)Decodes aapplication/x-www-form-urlencodedstring using a specific encoding scheme.
-
-
-
Method Detail
-
decode
public static String decode(String s)
Decodes ax-www-form-urlencodedstring. Except '+' is not decoded to a ' ' as described at the top of this class. UTF-8 encoding is used to determine what characters are represented by any consecutive sequences of the form "%xy".- Parameters:
s- theStringto decode- Returns:
- the newly decoded
String
-
decode
public static String decode(String s, String enc) throws UnsupportedEncodingException
Decodes aapplication/x-www-form-urlencodedstring using a specific encoding scheme. The supplied encoding is used to determine what characters are represented by any consecutive sequences of the form "%xy".Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites.
- Parameters:
s- theStringto decodeenc- The name of a supported character encoding.- Returns:
- the newly decoded
String - Throws:
UnsupportedEncodingException- If character encoding needs to be consulted, but named character encoding is not supported- See Also:
FileNameEncoder.encode(java.lang.String, java.lang.String)
-
-