Add a 64-bit int to the stream.

        :param long n: long int to add
3550
def add_int64(self, n):
        
        self.packet.write(struct.pack(">Q", n))
        return self
1135031
public void set(Long n) {
    spectatorGauge.set(n);
    AtomicLong number = getNumber();
    number.set(n);
  }
449428
def writeInteger(self, n):
        
        if n < MIN_29B_INT or n > MAX_29B_INT:
            self.writeNumber(float(n))

            return

        self.stream.write(TYPE_INTEGER)
        self.stream.write(encode_int(n))
1223906
public CommandArgs<K, V> add(long n) {

        singularArguments.add(IntegerArgument.of(n));
        return this;
    }
946877
def write_int64(self, value, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.pack('%sq' % endian, value)
980413
def add_adaptive_int(self, n):
        
        if n >= Message.big_int:
            self.packet.write(max_byte)
            self.add_string(util.deflate_long(n))
        else:
            self.packet.write(struct.pack(">I", n))
        return self
1089260
def write_octet(self, n):
        
        if (n < 0) or (n > 255):
            raise ValueError('Octet out of range 0..255')
        self._flushbits()
        self.out.write(pack('B', n))
138723
public void mark(long n) {
        tickIfNecessary();
        count.addAndGet(n);
        m15Rate.update(n);
        m120Rate.update(n);
    }
250884
public static void setInt(final byte[] b, final int n, final int offset) {
        b[offset + 0] = (byte) (n >>> 24);
        b[offset + 1] = (byte) (n >>> 16);
        b[offset + 2] = (byte) (n >>> 8);
        b[offset + 3] = (byte) (n >>> 0);
    }
1240994
def write_24bit_uint(self, n):
        
        if type(n) not in python.int_types:
            raise TypeError('expected an int (got:%r)' % (type(n),))

        if not 0 <= n <= 0xffffff:
            raise OverflowError("n is out of range")

        order = None

        if not self._is_big_endian():
            order = [0, 8, 16]
        else:
            order = [16, 8, 0]

        for x in order:
            self.write_uchar((n >> x) & 0xff)
1265729
def _long_to_bytes(n, length, byteorder):
    
    if byteorder == 'little':
        indexes = range(length)
    else:
        indexes = reversed(range(length))
    return bytearray((n >> i * 8) & 0xff for i in indexes)
963650
public void putLong(int pos, long l) {
		adaptSize(pos + 8);
		ByteBuffer bb = getBuffer(pos);
		int index = pos % _bufferSize;
		if (bb.limit() - index >= 8) {
			bb.putLong(index, l);
		} else {
			byte b0 = (byte)l;
			byte b1 = (byte)(l >> 8);
			byte b2 = (byte)(l >> 16);
			byte b3 = (byte)(l >> 24);
			byte b4 = (byte)(l >> 32);
			byte b5 = (byte)(l >> 40);
			byte b6 = (byte)(l >> 48);
			byte b7 = (byte)(l >> 56);
			
			if (_order == ByteOrder.BIG_ENDIAN) {
				putBytes(pos, b7, b6, b5, b4, b3, b2, b1, b0);
			} else {
				putBytes(pos, b0, b1, b2, b3, b4, b5, b6, b7);
			}
		}
	}
1340994
def writeByteArray(self, n):
        
        self.stream.write(TYPE_BYTEARRAY)

        ref = self.context.getObjectReference(n)

        if ref != -1:
            self._writeInteger(ref << 1)

            return

        self.context.addObject(n)

        buf = str(n)
        l = len(buf)
        self._writeInteger(l << 1 | REFERENCE_BIT)
        self.stream.write(buf)
1294446
public Packer putLong(final long value) {
		ensureCapacity(bufPosition + 8);
		buf[bufPosition++] = (byte) (value >> 56);
		buf[bufPosition++] = (byte) (value >> 48);
		buf[bufPosition++] = (byte) (value >> 40);
		buf[bufPosition++] = (byte) (value >> 32);
		buf[bufPosition++] = (byte) (value >> 24);
		buf[bufPosition++] = (byte) (value >> 16);
		buf[bufPosition++] = (byte) (value >> 8);
		buf[bufPosition++] = (byte) (value);
		return this;
	}
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));
    }
388453
public void mark(long n) {
        count.addAndGet(n);
        m1Rate.update(n);
        m5Rate.update(n);
        m15Rate.update(n);
    }
1148747
public static void writeLongLittleEndian(byte[] buffer, int offset, long value) {
		buffer[offset++] = (byte)(value & 0xFF);
		buffer[offset++] = (byte)((value >> 8) & 0xFF);
		buffer[offset++] = (byte)((value >> 16) & 0xFF);
		buffer[offset++] = (byte)((value >> 24) & 0xFF);
		buffer[offset++] = (byte)((value >> 32) & 0xFF);
		buffer[offset++] = (byte)((value >> 40) & 0xFF);
		buffer[offset++] = (byte)((value >> 48) & 0xFF);
		buffer[offset] = (byte)((value >> 56) & 0xFF);
	}