FileDocCategorySizeDatePackage
UnicodeFormatter.javaAPI DocExample1423Tue Dec 12 18:57:36 GMT 2000None

UnicodeFormatter

public class UnicodeFormatter extends Object

Fields Summary
Constructors Summary
Methods Summary
public static java.lang.StringbyteToHex(byte b)

      // Returns hex String representation of byte b
      char hexDigit[] = {
         '0", '1", '2", '3", '4", '5", '6", '7",
         '8", '9", 'a", 'b", 'c", 'd", 'e", 'f"
      };
      char[] array = { hexDigit[(b >> 4) & 0x0f], hexDigit[b & 0x0f] };
      return new String(array);
   
public static java.lang.StringcharToHex(char c)

      // Returns hex String representation of char c
      byte hi = (byte) (c >>> 8);
      byte lo = (byte) (c & 0xff);
      return byteToHex(hi) + byteToHex(lo);