Package fr.valhalla.mailcheck.utils

Examples of fr.valhalla.mailcheck.utils.EncryptedProperties


    private void startCheckers() {
        // Password entered
        if ((masterpassword != null) && (masterpassword.length() > 0)) {
            try {
                EncryptedProperties props = new EncryptedProperties(masterpassword);
                try {
                    FileInputStream in = new FileInputStream("fr.valhalla.mailcheck.accounts.properties");
                    props.load(in);
                    in.close();
                } catch (FileNotFoundException e) {
                    // Le fichier n'existe pas : on le crée
                    try {
                        props.store(new FileOutputStream(new File("fr.valhalla.mailcheck.accounts.properties")), null);
                    } catch (Exception e2) {
                        e2.printStackTrace();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
                Iterator i = props.keySet().iterator();
                while (i.hasNext()) {
                    String key = (String) i.next();
                    if (key.substring(0, 4) == null ? "acco" == null : key.substring(0, 4).equals("acco")) {
                        String accountName = props.getProperty(key);
                        // LANCEMENT DU CHECKER ICI
                        Checker c = new Checker(new Account(accountName, masterpassword), this);
                        if(gui) accountList.getContentPane().add(c.getCheckPanel());
                        c.start();
                        checkers.add(c);
View Full Code Here


    /**
     * Méthode utilisée par tous les constructeurs
     */
    public void init() {
        try {
            props = new EncryptedProperties(masterpassword);
        } catch(Exception e) { e.printStackTrace(); }
        // On essaie de charger les properties
        try {
            FileInputStream in = new FileInputStream("fr.valhalla.mailcheck.accounts.properties");
            props.load(in);
View Full Code Here

TOP

Related Classes of fr.valhalla.mailcheck.utils.EncryptedProperties

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.