public synchronized void openRead() throws ReplicatorException, InterruptedException {
  if (!file.exists()) {
    throw new THLException("Cannot open log file for reading; file does not exist: " + file.getName());
  }
  try {
    dataInput=new BufferedFileDataInput(file,bufferSize);
  }
 catch (  IOException e) {
    throw new THLException("Unable to open file for reading: " + file.getName(),e);
  }
  mode=AccessMode.read;
  checkFileHeader(dataInput);
}

public synchronized void openRead ( ) throws ReplicatorException , InterruptedException { if ( ! file . exists ( ) ) { throw new THLException ( "Cannot open log file for reading; file does not exist: " + file . getName ( ) ) ; } try { dataInput = new BufferedFileDataInput ( file , bufferSize ) ; } catch ( IOException e ) { throw new THLException ( "Unable to open file for reading: " + file . getName ( ) , e ) ; } mode = AccessMode . read ; checkFileHeader ( dataInput ) ; }
open the log file for reading . the log cannot be written .
