code: @Override
  	public void close() {
  		if (this.closed) {
  			return;
  		}
  		this.closed = true;
  		if (this.raf != null) {
  			/*
  			 * everything is written already. just update the header for
  			 * record count and the END_OF_DATA mark
  			 */
  			try {
  				this.header.numberOfRecords = this.recordCount;
  				this.raf.seek(0);
  				this.header.write(this.raf);
  				this.raf.seek(this.raf.length());
  				this.raf.writeByte(END_OF_DATA);
  			}
  			catch (IOException e) {
  				throw new DBFException(e.getMessage(), e);
  			}
  			finally {
  				DBFUtils.close(this.raf);
  			}
  		}
  		else if (this.outputStream != null) {
  			try {
  				writeToStream(this.outputStream);
  			}
  			finally {
  				DBFUtils.close(this.outputStream);
  			}
  		}
  
  	}
docs: In sync mode, write the header and close the file