public MessageSaver(MessageFactory messageFactory,File saveDir,Type... types) throws FileNotFoundException {
  if (!saveDir.exists()) {
    throw new FileNotFoundException(saveDir.getName());
  }
  this.messageFactory=messageFactory;
  this.saveDir=saveDir;
  this.types=new HashSet<>(Arrays.asList(types));
}

public MessageSaver ( MessageFactory messageFactory , File saveDir , Type ... types ) throws FileNotFoundException { if ( ! saveDir . exists ( ) ) { throw new FileNotFoundException ( saveDir . getName ( ) ) ; } this . messageFactory = messageFactory ; this . saveDir = saveDir ; this . types = new HashSet < > ( Arrays . asList ( types ) ) ; }
construct a messagesaver for specified message types .
