Package de.grey.ownsync.utils

Examples of de.grey.ownsync.utils.FileStateHashMap


    {
        OwnSyncStatus.setMessage("Scanning " + FileUtils.getAbsolutePath(getFolderLocation()));
        long start = System.currentTimeMillis();
       
        ScanFolderState scanFolderState = new ScanFolderState(folderState, folderConfiguration);
        FileStateHashMap props = scanFolderState.scan();

        OwnSyncStatus.appendToMessage(" took " + DataFormatter.getTimeString(System.currentTimeMillis() - start));
       
        OwnSyncStatus.setMessage("---------------------------------------------------------");
        OwnSyncStatus.setMessage("Found:\t\t files: " + scanFolderState.getFileCount() + "\t\t folders: " + scanFolderState.getDirectoryCount());
View Full Code Here


    {
        OwnSyncStatus.setMessage("Reading old folder state from file " + FileUtils.getAbsolutePath(readFromFile));
        long start = System.currentTimeMillis();

        Properties folderStateProperties = new Properties();
        FileStateHashMap folderState = null;
        BufferedInputStream bis = null;
        try
        {
            bis = new BufferedInputStream(readFromFile.getContent().getInputStream());
            folderStateProperties = PropertiesHelper.loadFromXML(folderStateProperties, bis);

            String key;
            ArrayList list = new ArrayList(folderStateProperties.keySet());
           
            folderState = new FileStateHashMap(list.size());
            for (int i = 0; i < list.size(); i++)
            {
                key = (String) list.get(i);
                if (SCANTIME.equals(key))
                {
                    lastSyncDate = (String) folderStateProperties.get(key);
                    continue;
                }
                   
                try
                {
                    folderState.put(key, new FileState((String) folderStateProperties.get(key), getTrashbox()));
                }
                catch (java.lang.StringIndexOutOfBoundsException e)
                {
                    folderState.put(key, folderStateProperties.get(key));
                }
            }
        }
        catch (Exception e)
        {
View Full Code Here

TOP

Related Classes of de.grey.ownsync.utils.FileStateHashMap

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.