public class URIEncoderDecoder extends Object
Constructor and Description |
---|
URIEncoderDecoder() |
Modifier and Type | Method and Description |
---|---|
static String |
decode(String s)
Decodes the string argument which is assumed to be encoded in the
x-www-form-urlencoded MIME content type using the UTF-8
encoding scheme. |
static String |
quoteIllegal(String s,
String legal)
All characters except letters ('a'..'
|
public static String quoteIllegal(String s, String legal) throws UnsupportedEncodingException
s
- java.lang.String the string to be convertedlegal
- java.lang.String the characters allowed to be preserved in the
string sUnsupportedEncodingException
public static String decode(String s) throws UnsupportedEncodingException
x-www-form-urlencoded
MIME content type using the UTF-8
encoding scheme.
'%' and two following hex digit characters are converted to the
equivalent byte value. All other characters are passed through
unmodified.
e.g. "A%20B%20C %24%25" -> "A B C $%"
Called from URI.getXYZ() methods
s
- java.lang.String The encoded string.UnsupportedEncodingException
Copyright © The Apache Software Foundation. All Rights Reserved.