@Deprecated
public class URLencode
extends java.lang.Object
| Constructor and Description |
|---|
URLencode()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
escape(java.lang.String s)
Deprecated.
Encode a string to the "x-www-form-urlencoded" form, enhanced
with the UTF-8-in-URL proposal.
|
static void |
main(java.lang.String[] args)
Deprecated.
|
static java.lang.String |
unescape(java.lang.String s)
Deprecated.
|
public static java.lang.String escape(java.lang.String s)
The ASCII characters 'a' through 'z', 'A' through 'Z', and '0' through '9' remain the same.
The unreserved characters - _ . ! ~ * ' ( ) remain the same.
The space character ' ' is converted into a plus sign '+'.
All other ASCII characters are converted into the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the character code
All non-ASCII characters are encoded in two steps: first to a sequence of 2 or 3 bytes, using the UTF-8 algorithm; secondly each of these bytes is encoded as "%xx".
s - The string to be encodedpublic static java.lang.String unescape(java.lang.String s)
public static void main(java.lang.String[] args)