{
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)
{