public Integer readUnicodeChar()
          throws IOException {

    int off = 0;
    int len = readInt();
    byte[] s = new byte[len];


    while (off < len) {
      off += read(s, off, len - off);
    }

    String charString = new String(s, "UTF-8");
    int retval = (int) charString.charAt(0);
    // NOTE: When we upgrade to java 1.5 change the above line to 
    //     int retval = charString.codePointAt(0);
    if (trace == API_TRACE_DETAILED) {
      debugNote("readUnicodeChar: 0x" + Integer.toHexString(retval));
    }

    return new Integer(retval);
  }