code: public static void append(StringBuffer buf,byte b,int base)
      {
          int bi=0xff&b;
          int c='0'+(bi/base)%base;
          if (c>'9')
              c= 'a'+(c-'0'-10);
          buf.append((char)c);
          c='0'+bi%base;
          if (c>'9')
              c= 'a'+(c-'0'-10);
          buf.append((char)c);
      }
docs: /* ------------------------------------------------------------