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 .