Package org.syncany.plugins.transfer

Examples of org.syncany.plugins.transfer.EncryptedTransferSettingsConverter


  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);
View Full Code Here


  public void save(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(transferSettings.getClass()));

      new Persister(strategy).write(this, file);
    }
    catch (Exception e) {
      throw new ConfigException("Cannot write config to file " + file, e);
View Full Code Here

TOP

Related Classes of org.syncany.plugins.transfer.EncryptedTransferSettingsConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.