public Read ( long offset, byte buffer, int index, int count ) : int | ||
offset | long | The offset into the stream to start reading. |
buffer | byte | The buffer to read to. |
index | int | The index into the buffer to start writing to. |
count | int | The number of bytes to read. |
return | int |
public override int Read(byte[] buffer, int offset, int count) { CheckLock(); int num = _buffer.Read(Position, buffer, offset, count); Seek(num, SeekOrigin.Current); return(num); }
public override int Read(byte[] buffer, int offset, int count) { lock (_localLock) { var cnt = _buffer.Read(_readPosition, buffer, offset, count); _readPosition += cnt; return(cnt); } }