public void update(List<UserReport> repList){
  File idxFile=new File(userroot,idxfile);
  FileWriter fw=null;
  try {
    fw=new FileWriter(idxFile);
    for (    UserReport urp : repList) {
      String line=urp.encodeLine() + lineSeparator;
      fw.write(line);
    }
  }
 catch (  Exception ex) {
    logger.log(Level.SEVERE,"Exception",ex);
  }
 finally {
    try {
      if (fw != null)       fw.close();
    }
 catch (    Exception iex) {
    }
  }
}

public void update ( List < UserReport > repList ) { File idxFile = new File ( userroot , idxfile ) ; FileWriter fw = null ; try { fw = new FileWriter ( idxFile ) ; for ( UserReport urp : repList ) { String line = urp . encodeLine ( ) + lineSeparator ; fw . write ( line ) ; } } catch ( Exception ex ) { logger . log ( Level . SEVERE , "Exception" , ex ) ; } finally { try { if ( fw != null ) fw . close ( ) ; } catch ( Exception iex ) { } } }
refresh the idx file , for example , after delete an entry
