code: public static void writeInt(int v, byte[] buf, int off) {
          buf[off] = (byte)((v >>> 24) & 0xFF);
          buf[off+1] = (byte)((v >>> 16) & 0xFF);
          buf[off+2] = (byte)((v >>>  8) & 0xFF);
          buf[off+3] = (byte)((v >>>  0) & 0xFF);
      }
docs: Converts the specified int value into
  4 bytes. The bytes are put into the
  specified byte array at a given offset
  location.
  
  @param v the int value to convert into 4 bytes.
  @param buf the byte array to put the resulting
  4 bytes.
  @param off offset in the byte array