public final class PayPalURLEncoder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
encode(java.lang.String s,
java.lang.String enc)
Encodes the given string
s in a x-www-form-urlencoded string
using the specified encoding scheme enc. |
public static java.lang.String encode(java.lang.String s,
java.lang.String enc)
throws java.io.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.java.io.UnsupportedEncodingException