GetBytes() 공개 정적인 메소드

public static GetBytes ( byte bytes, int startIndex, double value ) : void
bytes byte
startIndex int
value double
리턴 void
예제 #1
0
 public void Put(ushort value)
 {
     if (_autoResize)
     {
         ResizeIfNeed(_position + 2);
     }
     FastBitConverter.GetBytes(_data, _position, value);
     _position += 2;
 }
예제 #2
0
 public void Put(ulong value)
 {
     if (_autoResize)
     {
         ResizeIfNeed(_position + 8);
     }
     FastBitConverter.GetBytes(_data, _position, value);
     _position += 8;
 }
예제 #3
0
 public void Put(float value)
 {
     if (_autoResize)
     {
         ResizeIfNeed(_position + 4);
     }
     FastBitConverter.GetBytes(_data, _position, value);
     _position += 4;
 }
예제 #4
0
 public void PutBytesWithLength(byte[] data)
 {
     if (_autoResize)
     {
         ResizeIfNeed(_position + data.Length + 4);
     }
     FastBitConverter.GetBytes(_data, _position, data.Length);
     Buffer.BlockCopy(data, 0, _data, _position + 4, data.Length);
     _position += data.Length + 4;
 }
예제 #5
0
 public void PutBytesWithLength(byte[] data, int offset, int length)
 {
     if (_autoResize)
     {
         ResizeIfNeed(_position + length + 4);
     }
     FastBitConverter.GetBytes(_data, _position, length);
     Buffer.BlockCopy(data, offset, _data, _position + 4, length);
     _position += length + 4;
 }
예제 #6
0
        private void PutArray(Array arr, int sz)
        {
            ushort length = arr == null ? (ushort)0 : (ushort)arr.Length;

            sz *= length;
            if (_autoResize)
            {
                ResizeIfNeed(_position + sz + 2);
            }
            FastBitConverter.GetBytes(_data, _position, length);
            if (arr != null)
            {
                Buffer.BlockCopy(arr, 0, _data, _position + 2, sz);
            }
            _position += sz + 2;
        }
예제 #7
0
 private void SetUInt64BE(int offset, ulong value)
 {
     FastBitConverter.GetBytes(Bytes, offset, SwapEndianness(value));
 }