private synchronized void rotate(){
  Level oldLevel=getLevel();
  setLevel(Level.OFF);
  super.close();
  for (int i=count - 2; i >= 0; i--) {
    File f1=files[i];
    File f2=files[i + 1];
    if (f1.exists()) {
      if (f2.exists()) {
        f2.delete();
      }
      f1.renameTo(f2);
    }
  }
  try {
    open(files[0],false);
  }
 catch (  IOException ix) {
    reportError(null,ix,ErrorManager.OPEN_FAILURE);
  }
  setLevel(oldLevel);
}

private synchronized void rotate ( ) { Level oldLevel = getLevel ( ) ; setLevel ( Level . OFF ) ; super . close ( ) ; for ( int i = count - 2 ; i >= 0 ; i -- ) { File f1 = files [ i ] ; File f2 = files [ i + 1 ] ; if ( f1 . exists ( ) ) { if ( f2 . exists ( ) ) { f2 . delete ( ) ; } f1 . renameTo ( f2 ) ; } } try { open ( files [ 0 ] , false ) ; } catch ( IOException ix ) { reportError ( null , ix , ErrorManager . OPEN_FAILURE ) ; } setLevel ( oldLevel ) ; }
rotate the set of output files
