question: public synchronized void openWrite ( ) throws ReplicatorException , InterruptedException { if ( ! file . exists ( ) ) { throw new THLException ( "Cannot open log file for writing; file does not exist: " + file . getName ( ) ) ; } try { BufferedFileDataInput bfdi = new BufferedFileDataInput ( file , bufferSize ) ; checkFileHeader ( bfdi ) ; bfdi . close ( ) ; dataOutput = new BufferedFileDataOutput ( file , bufferSize ) ; } catch ( IOException e ) { throw new THLException ( "Failed to open existing file for writing: " + file . getName ( ) , e ) ; } mode = AccessMode . write ; if ( logFlushTask != null ) logFlushTask . addLogFile ( this ) ; }
target:  Prepare the log file for writing. The write offset is automatically set to the end of the file.