WriteUInt64() public static method

Writes the specified number of bits into a byte array
public static WriteUInt64 ( ulong source, int numberOfBits, byte destination, int destinationBitOffset ) : int
source ulong
numberOfBits int
destination byte
destinationBitOffset int
return int
 public NetBuffer Write(UInt64 source, int numberOfBits)
 {
     EnsureBufferSize(m_bitLength + numberOfBits);
     NetBitWriter.WriteUInt64(source, numberOfBits, m_data, m_bitLength);
     m_bitLength += numberOfBits;
     return(this);
 }
 public NetBuffer Write(UInt64 source)
 {
     EnsureBufferSize(m_bitLength + 64);
     NetBitWriter.WriteUInt64(source, 64, m_data, m_bitLength);
     m_bitLength += 64;
     return(this);
 }
        /// <summary>
        /// Writes a signed integer using 1 to 64 bits
        /// </summary>
        public void Write(Int64 source, int numberOfBits)
        {
            EnsureBufferSize(m_bitLength + numberOfBits);
            ulong usource = (ulong)source;

            NetBitWriter.WriteUInt64(usource, numberOfBits, m_data, m_bitLength);
            m_bitLength += numberOfBits;
        }
        /// <summary>
        /// Writes a 64 bit signed integer
        /// </summary>
        public void Write(Int64 source)
        {
            EnsureBufferSize(m_bitLength + 64);
            ulong usource = (ulong)source;

            NetBitWriter.WriteUInt64(usource, 64, m_data, m_bitLength);
            m_bitLength += 64;
        }
        public void WriteAt(Int32 offset, UInt64 source)
        {
            int newBitLength = Math.Max(m_bitLength, offset + 64);

            EnsureBufferSize(newBitLength);
            NetBitWriter.WriteUInt64(source, 64, m_data, offset);
            m_bitLength = newBitLength;
        }
 public void Write(UInt64 source)
 {
     EnsureBufferSize(m_bitLength + 64);
     NetBitWriter.WriteUInt64(source, 64, m_data, m_bitLength);
     m_bitLength += 64;
 }
示例#7
0
 internal void Write(UInt64 source, int numberOfBits)
 {
     InternalEnsureBufferSize(m_bitLength + numberOfBits);
     NetBitWriter.WriteUInt64(source, numberOfBits, m_data, m_bitLength);
     m_bitLength += numberOfBits;
 }