public synchronized void importFromFile(){
  Path file=Paths.get(importFileName);
  try (BufferedReader reader=Files.newBufferedReader(file,CHARSET)){
    LOGGER.info("[AddressbookImport] " + file.toAbsolutePath());
    String line;
    while ((line=reader.readLine()) != null) {
      String result=command(line);
      LOGGER.info(String.format("[AddressbookImport] %s [%s]",result,line));
    }
  }
 catch (  IOException ex) {
    LOGGER.warning("Failed importing addressbook from file: " + ex);
  }
}

public synchronized void importFromFile ( ) { Path file = Paths . get ( importFileName ) ; try ( BufferedReader reader = Files . newBufferedReader ( file , CHARSET ) ) { LOGGER . info ( "[AddressbookImport] " + file . toAbsolutePath ( ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { String result = command ( line ) ; LOGGER . info ( String . format ( "[AddressbookImport] %s [%s]" , result , line ) ) ; } } catch ( IOException ex ) { LOGGER . warning ( "Failed importing addressbook from file: " + ex ) ; } }
reads the commands from the import file and performs them .
