jChatBox.Util
Class CustomURLEncoder
java.lang.Object
|
+--jChatBox.Util.CustomURLEncoder
- public class CustomURLEncoder
- extends java.lang.Object
The class contains a utility method for converting a
String into a MIME format called
"x-www-form-urlencoded" format.
To convert a String, each character is examined in turn:
- The ASCII characters '
a' through 'z',
'A' through 'Z', '0'
through '9', and ".", "-",
"*", "_" remain the same.
- The space character '
' is converted into a
plus sign '+'.
- All other characters are converted into the 3-character string
"
%xy", where xy is the two-digit
hexadecimal representation of the lower 8-bits of the character.
|
Field Summary |
(package private) static int |
caseDiff
|
(package private) static java.util.BitSet |
needEncoding
|
|
Method Summary |
static java.lang.String |
encode(java.lang.String s)
Translates a string into x-www-form-urlencoded format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
needEncoding
static java.util.BitSet needEncoding
caseDiff
static final int caseDiff
- See Also:
- Constant Field Values
encode
public static java.lang.String encode(java.lang.String s)
- Translates a string into
x-www-form-urlencoded format.
- Parameters:
s - String to be translated.
- Returns:
- the translated
String.