public boolean syncToDisk ( ) { /** if we have a stream and we are dirty then flush. */ if ( outputStream != null && dirty ) { try { //outputStream.flush (); if ( outputStream instanceof FileChannel ) { FileChannel channel = ( FileChannel ) outputStream ; channel . force ( true ) ; } dirty = false ; return true ; } catch ( Exception ex ) { cleanupOutputStream ( ) ; return false ; } } else { return false ; } }
flush to disk .