public class FileNameDecoder extends Object
FileNameEncoder
Constructor and Description |
---|
FileNameDecoder() |
Modifier and Type | Method and Description |
---|---|
static String |
decode(String s)
Decodes a
x-www-form-urlencoded string. |
static String |
decode(String s,
String enc)
Decodes a
application/x-www-form-urlencoded string using a
specific encoding scheme. |
public static String decode(String s)
x-www-form-urlencoded
string. 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
".s
- the String
to decodeString
public static String decode(String s, String enc) throws UnsupportedEncodingException
application/x-www-form-urlencoded
string 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.
s
- the String
to decodeenc
- The name of a supported
character encoding.String
UnsupportedEncodingException
- If character encoding needs to be consulted, but named
character encoding is not supportedFileNameEncoder.encode(java.lang.String, java.lang.String)
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.