public void writeInt(long v)
                throws IOException {
    if (trace == API_TRACE_DETAILED) {
      Log.current.println("writeInt = " + v);
    }

    if ((-2147483648L < v) && (v < 2147483648L)) {
      writeFixnum((int) v);
    }
    else {
      writeBignum(v);
    }
  }