CmisSync.Lib.Streams.ChunkedStream.Write C# (CSharp) Method

Write() public method

Write the specified buffer from the given offset and the count.
public Write ( byte buffer, int offset, int count ) : void
buffer byte The buffer to write.
offset int Offset to start writing.
count int Count of bytes.
return void
        public override void Write(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) {
                throw new System.ArgumentOutOfRangeException("count", count, "count is overflow");
            }

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