Writes an int in a variable-length format.  Writes between one and five bytes.  Smaller values take fewer bytes.
Negative numbers are not supported.

@param i int to write
969172
public static void writeUnsignedInt(ObjectOutput out, int i) throws IOException {
      while ((i & ~0x7F) != 0) {
         out.writeByte((byte) ((i & 0x7f) | 0x80));
         i >>>= 7;
      }
      out.writeByte((byte) i);
   }
599429
private static void writeInt(byte[] buffer, int offset, int value) {
    buffer[offset    ] = (byte) (value >> 24);
    buffer[offset + 1] = (byte) (value >> 16);
    buffer[offset + 2] = (byte) (value >> 8);
    buffer[offset + 3] = (byte) value;
  }
419704
public void write1Bit(int value) throws IOException {
        Debug.print(value);
        if (curBit == 8) {
            curBit = 0;
            writeCurByte();
        }
        curByte[curBit++] = value;
    }
261208
public final static void writeMediumInt(ByteBuffer out, int value) {
        out.put((byte) ((value >>> 16) & 0xff));
        out.put((byte) ((value >>> 8) & 0xff));
        out.put((byte) (value & 0xff));
    }
1072747
public void write(int b) {
        int newcount = count + 1;
        if (newcount > buffer.length) buffer = copyOf(buffer, Math.max(buffer.length << 1, newcount));
        buffer[count] = (byte) b;
        count = newcount;
    }
611273
final void writeInt(int value)
    {
        byte writeBuffer[] = new byte[4];
        writeBuffer[0] = (byte) (value >>> 24);
        writeBuffer[1] = (byte) (value >>> 16);
        writeBuffer[2] = (byte) (value >>> 8);
        writeBuffer[3] = (byte) (value >>> 0);
        write(writeBuffer, 0, 4);
    }
36086
public void write(int c) {
        if (c != -1) {
            current.append((char)c);
        }
        if (c == '\n') {
            current = new StringBuilder();
            lines.add(current);
        }
    }
107073
public int writeVarint(int varint) throws IOException {
        int b = 1;
        boolean c = (varint ^ (varint & 0x7f)) != 0;
        out.write((c ? 0x80 : 0x00) | (varint & 0x7f));
        while (c) {
            ++b;
            varint >>>= 7;
            c = (varint ^ (varint & 0x7f)) != 0;
            out.write((c ? 0x80 : 0x00) | (varint & 0x7f));
        }
        return b;
    }
145129
public void print(int i)
  {
    if (i == 0x80000000) {
      print("-2147483648");
      return;
    }

    if (i < 0) {
      write('-');
      i = -i;
    } else if (i < 9) {
      write('0' + i);
      return;
    }

    int length = 0;
    int exp = 10;

    if (i >= 1000000000)
      length = 9;
    else {
      for (; i >= exp; length++)
        exp = 10 * exp;
    }

    int j = 31;
    
    while (i > 0) {
      _tempCharBuffer[--j] = (char) ((i % 10) + '0');
      i /= 10;
    }

    write(_tempCharBuffer, j, 31 - j);
  }
494416
public void writeInt(OutputStream out, int value) throws IOException {
        writeStartArray(out);
        writeIntInternal(out, value);
        writeEndArray(out);
    }
608444
public void write8LE(final long n) {
        write((byte) (n & 0xff));
        write((byte) (n >> 8 & 0xff));
        write((byte) (n >> 16 & 0xff));
        write((byte) (n >> 24 & 0xff));
        write((byte) (n >> 32 & 0xff));
        write((byte) (n >> 40 & 0xff));
        write((byte) (n >> 48 & 0xff));
        write((byte) (n >> 56 & 0xff));
    }
1341366
public void write(byte[] buf, int off, int len) throws IOException {
    // This could of course be optimized
    for (int i = 0; i < len; i++) {
      write(buf[off + i]);
    }
  }
532854
public void writeIntCurrentPosition(int v) throws IOException {
    int index = (int)(position - bufferOffset);
    if (index < maxBufferSize) {
      buffer[index] = v;
      isByte[index] = false;
      if (index + 1 > currentBufferSize) currentBufferSize = index + 1;
      if (index + 1 >= maxBufferSize) {
        writeBuffer();
        newBuffer(position + 1);
      }
    } else {
      aFile.write(v);
    }
    position++;
  }
281218
public static void writeUnsignedInt(DataOutputStream out, int uint) throws IOException
    {
        out.writeByte((byte) ((uint >>> 8) & 0xFF));
        out.writeByte((byte) ((uint >>> 0) & 0xFF));
    }
1087620
def write_varint(i, data: nil, stream: nil)
      buf = encode_varint(i)
      data << buf if data
      stream.write(buf) if stream
      buf
    end
62525
public void println(int i) throws IOException
  {
    String value = Integer.toString(i);
    this.output.write(value.getBytes(), 0, value.length());
    this.output.write(CRLF, 0, 2);
  }
1255214
void writeInt(int value) throws IOException {
        if ((value & 0xfffffff8) == 0) {
            output.append((char) (value + 48));
        } else {
            output.append(Integer.toString(value));
        }
    }