Read() public method

Reads the number of bytes specified into the buffer given, starting with the offset indicated.
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
Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public override int Read(byte[] buffer, int offset, int count)
 {
     lock (_localLock)
     {
         var cnt = _buffer.Read(_readPosition, buffer, offset, count);
         _readPosition += cnt;
         return(cnt);
     }
 }