Example #1
0
        public void Read(byte[] buffer)
        {
            if (buffer == null || buffer.Length <= 0)
            {
                return;
            }

            int index = 0, currCount;

            int numOfArray = BitConverter.ToInt32(buffer, index);
            index += 4;

            for (int i = 0; i < numOfArray; i++)
            {
                currCount = BitConverter.ToInt32(buffer, index);
                index += 4;

                RangeArray ra = new RangeArray();
                ra.Buffer = buffer;
                ra.Offset = index;
                ra.Count = currCount;
                m_byteArrays.Add(ra);

                index += currCount;
            }
        }
Example #2
0
 public void AddByteArray(byte[] bytes, int offset, int count)
 {
     RangeArray ra = new RangeArray();
     ra.Buffer = bytes;
     ra.Offset = offset;
     ra.Count = count;
     m_byteArrays.Add(ra);
 }
Example #3
0
 public void AddByteArray(byte[] bytes)
 {
     RangeArray ra = new RangeArray();
     ra.Buffer = bytes;
     ra.Offset = 0;
     ra.Count = bytes.Length;
     m_byteArrays.Add(ra);
 }