private void WriteSector()
 {
     if (_bufferLoaded)
     {
         _s.Seek(-_bufferSize, SeekOrigin.Current);
     }
     _s.Write(_buffer, 0, _bufferSize);
     _bufferDirty  = false;
     _bufferLoaded = false;
     _bufferPos    = 0;
     Array.Clear(_buffer, 0, _bufferSize);
 }
        /// <summary>
        /// Writes a sector
        /// </summary>
        private void WriteSector()
        {
            if (_bufferLoaded)
            {
                //go back to beginning of the current sector
                _s.Seek(-_bufferSize, SeekOrigin.Current);
            }

            //write it
            _s.Write(_buffer, 0, _bufferSize);
            _bufferDirty  = false;
            _bufferLoaded = false;
            _bufferPos    = 0;
            Array.Clear(_buffer, 0, _bufferSize);
        }