|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.ByteArrayOutputStream
wt.util.EncodingConverter
wt.httpgw.EncodingConverter
#wt.util.EncodingConverter
The class contains utility methods for converting a
String
into a MIME format called
"x-www-form-urlencoded
" and vice versa.
To convert a String
, each character is examined in turn:
a
' through 'z
',
'A
' through 'Z
', and '0
'
through '9
' remain the same.
' is converted into a
plus sign '+
'.
%xy
", where xy is the
two-digit hexadecimal representation of the byte.
Deployment Notes:
static EncodingConverter staticEncoder = new EncodingConverter();
public void sampleMethod(String s)
{
synchronized( staticEncoder )
}
{
staticEncoder.encode(s);
}
Field Summary |
Fields inherited from class wt.util.EncodingConverter |
dontNeedEncoding, MAX_BYTES_PER_CHAR, toHex, UTF8 |
Fields inherited from class java.io.ByteArrayOutputStream |
buf, count |
Constructor Summary | |
EncodingConverter()
Deprecated. Consturctor to create a new EncodingConverter with the encoding set to UTF-8. |
|
EncodingConverter(int ByteSize)
Deprecated. Constructor to create a new EncodingConverter with an encoding set to UTF-8 and a specified buffer capacity. |
|
EncodingConverter(String encoding)
Deprecated. Constructor to create a new EncodingConverter with a specified encoding. |
Methods inherited from class wt.util.EncodingConverter |
decode, decode, decodeBytes, decodeBytes, decodeBytes, encode, encode, encode, encode, escape, escape, unicodeToAscii |
Methods inherited from class java.io.ByteArrayOutputStream |
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo |
Methods inherited from class java.io.OutputStream |
flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EncodingConverter()
EncodingConverter.EncodingConverter()
public EncodingConverter(int ByteSize)
ByteSize
- The buffer capacity.EncodingConverter.EncodingConverter(int)
public EncodingConverter(String encoding)
encoding
- The encoding to use for encode/decoding.EncodingConverter.EncodingConverter(String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |