CSharpUtils.Streams.ZeroStream.Read C# (CSharp) Method

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int
        public override int Read(byte[] buffer, int offset, int count)
        {
            int Readed = Math.Min(count, (int)(Length - Position));
            for (int n = 0; n < count; n++) buffer[offset + n] = this.ValueToRepeat;
            Position += Readed;
            return Readed;
        }