Writes the given integer in little-endian on the stream.
975834
private static void writeLEInt(OutputStream out, int i) throws IOException {
		out.write((byte)i);
		out.write((byte)((i >> 8) & 0xFF));
		out.write((byte)((i >> 16) & 0xFF));
		out.write((byte)((i >> 24) & 0xFF));
	}
434854
public static void writeMediumInt(IoBuffer out, int value) {
        byte[] bytes = new byte[3];
        bytes[0] = (byte) ((value >>> 16) & 0x000000FF);
        bytes[1] = (byte) ((value >>> 8) & 0x000000FF);
        bytes[2] = (byte) (value & 0x00FF);
        out.put(bytes);
    }
931893
public static void writeLongLittleEndian(ByteBuffer io, long value) {
		io.put((byte)(value & 0xFF));
		io.put((byte)((value >> 8) & 0xFF));
		io.put((byte)((value >> 16) & 0xFF));
		io.put((byte)((value >> 24) & 0xFF));
		io.put((byte)((value >> 32) & 0xFF));
		io.put((byte)((value >> 40) & 0xFF));
		io.put((byte)((value >> 48) & 0xFF));
		io.put((byte)((value >> 56) & 0xFF));
	}
821704
public static void writeUnsignedIntegerBigEndian(ByteBuffer io, long value) {
		io.put((byte)((value >> 24) & 0xFF));
		io.put((byte)((value >> 16) & 0xFF));
		io.put((byte)((value >> 8) & 0xFF));
		io.put((byte)(value & 0xFF));
	}
1328570
public static int readIntegerLittleEndian(InputStream io) throws IOException {
		int value = io.read();
		if (value < 0) throw new EOFException();
		int i = io.read();
		if (i < 0) throw new EOFException();
		value |= i << 8;
		i = io.read();
		if (i < 0) throw new EOFException();
		value |= i << 16;
		i = io.read();
		if (i < 0) throw new EOFException();
		value |= i << 24;
		return value;
	}
351870
public static void writeUnsignedShortLittleEndian(ByteBuffer io, int value) {
		io.put((byte)(value & 0xFF));
		io.put((byte)((value >> 8) & 0xFF));
	}
134152
public static void writeUnsignedShortLittleEndian(IO.WritableByteStream io, int value) throws IOException {
		io.write((byte)(value & 0xFF));
		io.write((byte)((value >> 8) & 0xFF));
	}
284879
public void write4LE(final long n) {
        write((byte) (n & 0xff));
        write((byte) ((n & 0xff00) >> 8));
        write((byte) ((n & 0xff0000) >> 16));
        write((byte) ((n & 0xff000000) >> 24));
    }
794431
public static void writeUnsignedShortLittleEndian(byte[] buffer, int offset, int value) {
		buffer[offset++] = (byte)(value & 0xFF);
		buffer[offset] = (byte)((value >> 8) & 0xFF);
	}
780281
public void writeInt(int pInt) throws IOException {
        file.write(pInt & 0xFF);
        file.write((pInt >>> 8) & 0xFF);
        file.write((pInt >>> 16) & 0xFF);
        file.write((pInt >>> 24) & 0xFF);
    }
420944
public static void writeLongLittleEndian(IO.WritableByteStream io, long value) throws IOException {
		io.write((byte)(value & 0xFF));
		io.write((byte)((value >> 8) & 0xFF));
		io.write((byte)((value >> 16) & 0xFF));
		io.write((byte)((value >> 24) & 0xFF));
		io.write((byte)((value >> 32) & 0xFF));
		io.write((byte)((value >> 40) & 0xFF));
		io.write((byte)((value >> 48) & 0xFF));
		io.write((byte)((value >> 56) & 0xFF));
	}
818169
@Override
    public void writeInt(int value)
        throws IOException
    {
        int offset = _offset;
        byte[] buffer = _buffer;

        if (SIZE <= offset + 16) {
            flushBuffer();
            offset = _offset;
        }

        if (INT_DIRECT_MIN <= value && value <= INT_DIRECT_MAX)
            buffer[offset++] = (byte) (value + BC_INT_ZERO);
        else if (INT_BYTE_MIN <= value && value <= INT_BYTE_MAX) {
            buffer[offset++] = (byte) (BC_INT_BYTE_ZERO + (value >> 8));
            buffer[offset++] = (byte) (value);
        }
        else if (INT_SHORT_MIN <= value && value <= INT_SHORT_MAX) {
            buffer[offset++] = (byte) (BC_INT_SHORT_ZERO + (value >> 16));
            buffer[offset++] = (byte) (value >> 8);
            buffer[offset++] = (byte) (value);
        }
        else {
            buffer[offset++] = (byte) ('I');
            buffer[offset++] = (byte) (value >> 24);
            buffer[offset++] = (byte) (value >> 16);
            buffer[offset++] = (byte) (value >> 8);
            buffer[offset++] = (byte) (value);
        }

        _offset = offset;
    }
451057
public static void writeInt(byte[] b, int offset, int value) {
    b[offset++] = (byte) (value >>> 24);
    b[offset++] = (byte) (value >>> 16);
    b[offset++] = (byte) (value >>> 8);
    b[offset] = (byte)value;
  }
1022186
private void writeInt(int i, byte[] buf, int offset) throws IOException {
        writeShort(i & 0xffff, buf, offset);
        writeShort((i >> 16) & 0xffff, buf, offset + 2);
    }
598328
protected static void writeInt(ChannelBuffer buf, int value) {
        if (value < 10) {
            buf.writeByte('0' + value);
            return;
        }

        StringBuilder sb = new StringBuilder(8);
        while (value > 0) {
            int digit = value % 10;
            sb.append((char) ('0' + digit));
            value /= 10;
        }

        for (int i = sb.length() - 1; i >= 0; i--) {
            buf.writeByte(sb.charAt(i));
        }
    }
1369512
def write_uint32(self, value, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.pack('%sI' % endian, value)
1259055
function writeInt32W(buffer, value, offset, isBigEndian, noAssert) {
  if (!noAssert) {
    assert.ok(value !== undefined && value !== null,
        'missing value');

    assert.ok(typeof (isBigEndian) === 'boolean',
        'missing or invalid endian');

    assert.ok(offset !== undefined && offset !== null,
        'missing offset');

    assert.ok(offset + 3 < buffer.length,
        'Trying to write beyond buffer length');

    verifsint(value, 0x7fffffff, -0x80000000);
  }

  if (value >= 0) {
    writeUInt32W(buffer, value, offset, isBigEndian, noAssert);
  } else {
    writeUInt32W(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert);
  }
}