public override int Read(byte[] buffer, int position, int size) { int n = stream.Read (buffer, position, size); return (n >= 0) ? n : -1; }