protected override bool RawSeek(int offset, SeekOrigin whence)
{
// Store the current position to be able to check for seek()'s success.
long position = stream.Position;
return stream.Seek(offset, (SeekOrigin)whence)
== SeekExpects(position, stream.Length, offset, whence);
}