@Test void testCreateArchiveFromParts() { List<FileEntry> fileEntries = createFileEntriesFromFile(FILE_ENTRIES); Path archiveFromParts = archiveMerger.createArchiveFromParts(fileEntries); Assertions.assertTrue(archiveFromParts.toString() .endsWith(getArchiveName(fileEntries.get(0)))); }
public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<FileEntry> archiveParts); }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<FileEntry> archiveParts);  }