Examples of AnnotationStrategy


Examples of org.simpleframework.xml.convert.AnnotationStrategy

  }
 
  public static Serializer createSerializer() {
    Style style = new HyphenStyle();
    Format format = new Format(style);
    AnnotationStrategy strategy = new AnnotationStrategy();
    Serializer serializer = new Persister(strategy, format);
    return serializer;
  }
View Full Code Here

Examples of org.simpleframework.xml.convert.AnnotationStrategy

        {
            inputStream = new BufferedInputStream(res.open());
            try
            {
                return PersisterHelpers.createPersister(resourceLookup,
                    new AnnotationStrategy()).read(clazz, inputStream);
            }
            catch (IOException e)
            {
                throw e;
            }
View Full Code Here

Examples of org.simpleframework.xml.convert.AnnotationStrategy

    this.configEncryptionKey = configEncryptionKey;
  }

  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

Examples of org.simpleframework.xml.convert.AnnotationStrategy

    }
  }

  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
TOP
Copyright © 2018 www.massapi.com. 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.