Package org.syncany.config

Examples of org.syncany.config.ConfigException


  public static DaemonConfigTO load(File file) throws ConfigException {
    try {
      return new Persister().read(DaemonConfigTO.class, file);
    }
    catch (Exception e) {
      throw new ConfigException("Config file does not exist or is invalid: " + file, e);
    }
  }
View Full Code Here


  public void save(File file) throws ConfigException {
    try {
      new Persister().write(this, file);
    }
    catch (Exception e) {
      throw new ConfigException("Config could not be written: " + file, e);
    }
  }
View Full Code Here

  public void save(File file) throws ConfigException {
    try {
      new Persister().write(this, file);
    }
    catch (Exception e) {
      throw new ConfigException("Cannot write masterTO to file " + file, e);
    }
  }
View Full Code Here

  public static UserConfigTO load(File file) throws ConfigException {
    try {
      return new Persister(new AnnotationStrategy()).read(UserConfigTO.class, file);
    }
    catch (Exception e) {
      throw new ConfigException("User config file cannot be read or is invalid: " + file, e);
    }
  }
View Full Code Here

  public void save(File file) throws ConfigException {
    try {
      new Persister(new AnnotationStrategy()).write(this, file);
    }
    catch (Exception e) {
      throw new ConfigException("Cannot write user config to file " + file, e);
    }
  }
View Full Code Here

      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

      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

  public void save(File file) throws ConfigException {
    try {
      new Persister().write(this, file);
    }
    catch (Exception e) {
      throw new ConfigException("Cannot write repoTO to file " + file, e);
    }
  }
View Full Code Here

      serializer.write(this, plaintextRepoOutputStream);

      CipherUtil.encrypt(new ByteArrayInputStream(plaintextRepoOutputStream.toByteArray()), new FileOutputStream(file), cipherSpecs, masterKey);
    }
    catch (Exception e) {
      throw new ConfigException("Cannot write repoTO (encrypted) to file " + file, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.syncany.config.ConfigException

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.