java.lang
Class StringCoding

java.lang.Object
  |
  +--java.lang.StringCoding

class StringCoding
extends Object

Utility class for string encoding and decoding.


Field Summary
private static ThreadLocal decoder
           
private static ThreadLocal encoder
           
private static boolean warnUnsupportedCharset
           
 
Constructor Summary
private StringCoding()
           
 
Method Summary
(package private) static char[] decode(byte[] ba, int off, int len)
           
(package private) static char[] decode(String charsetName, byte[] ba, int off, int len)
           
private static Object deref(ThreadLocal tl)
           
(package private) static byte[] encode(char[] ca, int off, int len)
           
(package private) static byte[] encode(String charsetName, char[] ca, int off, int len)
           
private static java.nio.charset.Charset lookupCharset(String csn)
           
private static void set(ThreadLocal tl, Object ob)
           
private static byte[] trim(byte[] ba, int len)
           
private static char[] trim(char[] ca, int len)
           
private static void warnUnsupportedCharset(String csn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

decoder

private static ThreadLocal decoder

encoder

private static ThreadLocal encoder

warnUnsupportedCharset

private static boolean warnUnsupportedCharset
Constructor Detail

StringCoding

private StringCoding()
Method Detail

deref

private static Object deref(ThreadLocal tl)

set

private static void set(ThreadLocal tl,
                        Object ob)

trim

private static byte[] trim(byte[] ba,
                           int len)

trim

private static char[] trim(char[] ca,
                           int len)

lookupCharset

private static java.nio.charset.Charset lookupCharset(String csn)

warnUnsupportedCharset

private static void warnUnsupportedCharset(String csn)

decode

static char[] decode(String charsetName,
                     byte[] ba,
                     int off,
                     int len)
              throws UnsupportedEncodingException
UnsupportedEncodingException

decode

static char[] decode(byte[] ba,
                     int off,
                     int len)

encode

static byte[] encode(String charsetName,
                     char[] ca,
                     int off,
                     int len)
              throws UnsupportedEncodingException
UnsupportedEncodingException

encode

static byte[] encode(char[] ca,
                     int off,
                     int len)


comments?