Example #1
0
		public BufferOffsetSize[] GetBufferArray ()
		{
			int count = 0;
			for (var ptr = first; ptr != null; ptr = ptr.next)
				count++;
			var array = new BufferOffsetSize [count];
			count = 0;
			for (var ptr = first; ptr != null; ptr = ptr.next)
				array [count++] = ptr;
			return array;
		}
Example #2
0
        public BufferOffsetSize[] GetBufferArray()
        {
            int count = 0;

            for (var ptr = first; ptr != null; ptr = ptr.next)
            {
                count++;
            }
            var array = new BufferOffsetSize [count];

            count = 0;
            for (var ptr = first; ptr != null; ptr = ptr.next)
            {
                array [count++] = ptr;
            }
            return(array);
        }
Example #3
0
        public BufferOffsetSize GetBuffer()
        {
            int totalSize = 0;

            for (var ptr = first; ptr != null; ptr = ptr.next)
            {
                totalSize += ptr.Size;
            }

            var outBuffer = new BufferOffsetSize(new byte [totalSize]);
            int offset    = 0;

            for (var ptr = first; ptr != null; ptr = ptr.next)
            {
                Buffer.BlockCopy(ptr.Buffer, ptr.Offset, outBuffer.Buffer, offset, ptr.Size);
                offset += ptr.Size;
            }
            return(outBuffer);
        }
Example #4
0
		public BufferOffsetSize GetBuffer ()
		{
			int totalSize = 0;
			for (var ptr = first; ptr != null; ptr = ptr.next)
				totalSize += ptr.Size;

			var outBuffer = new BufferOffsetSize (new byte [totalSize]);
			int offset = 0;
			for (var ptr = first; ptr != null; ptr = ptr.next) {
				Buffer.BlockCopy (ptr.Buffer, ptr.Offset, outBuffer.Buffer, offset, ptr.Size);
				offset += ptr.Size;
			}
			return outBuffer;
		}