Read() 공개 메소드

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.
리턴 int
예제 #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);
        }
예제 #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);
     }
 }