public override void Flush() { if (!writable) { throw new InvalidOperationException(); } if (maxlength != file.data.LongLength) { Array.Resize(ref file.data, (int)maxlength); } file.NotifyWritten(); }