public final class PayPalURLEncoder extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
encode(String s,
String enc)
Encodes the given string
s in a x-www-form-urlencoded string
using the specified encoding scheme enc. |
public static String encode(String s, String enc) throws UnsupportedEncodingException
s in a x-www-form-urlencoded string
using the specified encoding scheme enc.
All characters except letters ('a'..'z', 'A'..'Z') and numbers ('0'..'9') and characters '_' are converted into their hexadecimal value prepended by '%'. For example: '#' -> %23. In addition, spaces are substituted by '+'
s - the string to be encoded.enc - the encoding scheme to be used.UnsupportedEncodingExceptionCopyright © 2016. All Rights Reserved.