code: static String toHex(int n) {
          if (n < 0x10000)
              return "<" + toHex4(n) + ">";
          n -= 0x10000;
          int high = (n / 0x400) + 0xd800;
          int low = (n % 0x400) + 0xdc00;
          return "[<" + toHex4(high) + toHex4(low) + ">]";
      }
docs: Gets an hex string in the format "&lt;HHHH&gt;".
  @param n the number
  @return the hex string