public override int Read (byte [] buf, int offset, int count) { int n = 0; for (int i = 0; i < count; i++){ int c = ReadByte (); if (c == -1) return n; buf [offset + n] = (byte) c; n++; } return n; }
public override int Read(byte[] buffer, int offset, int count) { int bytesRead = SourceStream.Read(buffer, offset, count); ProcessData(buffer, offset, bytesRead); return(bytesRead); }