public static ConfigTO load(File file) throws ConfigException {
try {
Registry registry = new Registry();
Strategy strategy = new RegistryStrategy(registry);
registry.bind(SaltedSecretKey.class, new SaltedSecretKeyConverter());
registry.bind(String.class, new EncryptedTransferSettingsConverter());
return new Persister(strategy).read(ConfigTO.class, file);
}
catch (Exception ex) {
throw new ConfigException("Config file does not exist or is invalid: " + file, ex);