AlphaTab.IO.ByteBuffer.Read C# (CSharp) Метод

Read() публичный Метод

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Результат int
        public int Read(byte[] buffer, int offset, int count)
        {
            int n = _length - _position;
            if (n > count) n = count;
            if (n <= 0)
                return 0;

            if (n <= 8)
            {
                int byteCount = n;
                while (--byteCount >= 0)
                    buffer[offset + byteCount] = _buffer[_position + byteCount];
            }
            else
                Std.BlockCopy(_buffer, _position, buffer, offset, n);
            _position += n;

            return n;
        }