public void flush() throws IOException {
    if (bufferModified) {
      file.seek(bufferStart);
      file.write(buffer, 0, dataSize);
      //System.out.println("--flush at "+bufferStart+" dataSize= "+dataSize+ " filePosition= "+filePosition);
      bufferModified = false;
    }

    /* check min length
    if (!readonly && (minLength != 0) && (minLength != file.length())) {
      file.setLength(minLength);
    } */
  }
public void flush() throws IOException {
    if (bufferModified) {
      file.seek(bufferStart);
      file.write(buffer, 0, dataSize);
      
      bufferModified = false;
    }

    
  }
public void flush ( ) throws IOException { if ( bufferModified ) { file . seek ( bufferStart ) ; file . write ( buffer , 0 , dataSize ) ; //System.out.println("--flush at "+bufferStart+" dataSize= "+dataSize+ " filePosition= "+filePosition);
 bufferModified = false ; } /* check min length
    if (!readonly && (minLength != 0) && (minLength != file.length())) {
      file.setLength(minLength);
    } */ }
Copy the contents of the buffer to the disk.

@throws IOException if an I/O error occurs.
Copy the contents of the buffer to the disk .