| | |
| | | { |
| | | backupID = backupConfig.getBackupID(); |
| | | backupDir = backupConfig.getBackupDirectory(); |
| | | backupProperties = new HashMap<String,String>(); |
| | | backupProperties = new HashMap<>(); |
| | | shouldCompress = backupConfig.compressData(); |
| | | |
| | | incrementalBaseID = retrieveIncrementalBaseID(backupConfig); |
| | |
| | | this.backendID = backendID; |
| | | this.newBackupParams = backupParams; |
| | | this.cryptoEngine = crypt; |
| | | dependencies = new HashSet<String>(); |
| | | dependencies = new HashSet<>(); |
| | | if (backupParams.isIncremental) |
| | | { |
| | | HashMap<String,String> properties = backupParams.baseBackupInfo.getBackupProperties(); |
| | |
| | | */ |
| | | List<BackupInfo> getBackupDependencies() throws DirectoryException |
| | | { |
| | | List<BackupInfo> dependencies = new ArrayList<BackupInfo>(); |
| | | List<BackupInfo> dependencies = new ArrayList<>(); |
| | | BackupInfo currentBackupInfo = backupInfo; |
| | | while (currentBackupInfo != null && !currentBackupInfo.getDependencies().isEmpty()) |
| | | { |
| | |
| | | void writeUnchangedFiles(Path rootDirectory, ListIterator<Path> files, BackupConfig backupConfig) |
| | | throws DirectoryException |
| | | { |
| | | List<String> unchangedFilenames = new ArrayList<String>(); |
| | | List<String> unchangedFilenames = new ArrayList<>(); |
| | | while (files.hasNext() && !backupConfig.isCancelled()) |
| | | { |
| | | Path file = files.next(); |
| | |
| | | */ |
| | | Set<String> readUnchangedDependentFiles() throws DirectoryException |
| | | { |
| | | Set<String> hashSet = new HashSet<String>(); |
| | | Set<String> hashSet = new HashSet<>(); |
| | | ZipInputStream zipStream = null; |
| | | try |
| | | { |
| | |
| | | |
| | | private List<String> readAllLines(ZipInputStream zipStream) throws IOException |
| | | { |
| | | final ArrayList<String> results = new ArrayList<String>(); |
| | | final ArrayList<String> results = new ArrayList<>(); |
| | | String line; |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream)); |
| | | while ((line = reader.readLine()) != null) |
| | |
| | | } |
| | | return results; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |