CmisSync.Lib.Streams.ChunkedStream.Read C# (CSharp) Метод

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

Read the specified buffer from the given offset and with the length of count.
public Read ( byte buffer, int offset, int count ) : int
buffer byte The buffer to read.
offset int Offset to start reading.
count int Count of bytes.
Результат int
        public override int Read(byte[] buffer, int offset, int count) {
            if (offset < 0) {
                throw new System.ArgumentOutOfRangeException("offset", offset, "offset is negative");
            }

            if (count < 0) {
                throw new System.ArgumentOutOfRangeException("count", count, "count is negative");
            }

            if (count > this.chunkSize - this.Position) {
                count = (int)(this.chunkSize - this.Position);
            }

            count = this.source.Read(buffer, offset, count);
            this.position += count;
            return count;
        }