public class ArchiveFileHandler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ArchiveFileHandler.ArchiveFormat
The Enum ArchiveFormat.
|
| Constructor and Description |
|---|
ArchiveFileHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPathReplacement(java.lang.String replace,
java.lang.String replaceWith)
Adds a path replacement.
|
boolean |
appendFoldersToArchive(java.io.File archiveSourceFile,
java.io.File archiveTargetFile,
java.util.HashMap<java.io.File,java.lang.String> folders,
ArchiveFileHandler.ArchiveFormat archiveFormat,
boolean deleteAfterwards)
Appends multiple folders to an existing archive
|
boolean |
appendFoldersToArchive(java.io.File archiveSourceFile,
java.io.File archiveTargetFile,
java.util.HashMap<java.io.File,java.lang.String> folders,
boolean deleteAfterwards)
Appends multiple folders to an existing archive.
|
boolean |
appendFolderToArchive(java.io.File folder,
java.io.File archiveFile,
java.io.File targetFile)
Adds a folder to an archive.
|
boolean |
appendFolderToArchive(java.io.File folder,
java.io.File archiveFile,
java.io.File targetFile,
java.lang.String pathInsideArchive)
Appends a folder to an existing archive.
|
boolean |
appendFolderToArchive(java.io.File folder,
java.io.File archiveFile,
java.io.File targetFile,
java.lang.String pathInsideArchive,
ArchiveFileHandler.ArchiveFormat archiveFormat)
Appends a folder to an existing archive.
|
boolean |
compressFolder(java.io.File sourceFolder,
java.io.File targetFile)
Compresses a folder.
|
boolean |
compressFolder(java.io.File sourceFolder,
java.io.File targetFile,
ArchiveFileHandler.ArchiveFormat archiveFormat)
Compresses a folder.
|
boolean |
decompressFolder(java.io.File archiveFile,
java.io.File targetFolder)
Decompresses an archive.
|
boolean |
decompressFolder(java.io.File archiveFile,
java.io.File targetFolder,
ArchiveFileHandler.ArchiveFormat archiveFormat)
Decompresses an archive file to the specified target folder.
|
void |
deletePathReplacement(java.lang.String dontReplace)
Deletes a previously defined replacement.
|
public boolean compressFolder(java.io.File sourceFolder,
java.io.File targetFile)
sourceFolder - the source foldertargetFile - the target filepublic boolean compressFolder(java.io.File sourceFolder,
java.io.File targetFile,
ArchiveFileHandler.ArchiveFormat archiveFormat)
sourceFolder - the source foldertargetFile - the target filearchiveFormat - the archive formatpublic boolean decompressFolder(java.io.File archiveFile,
java.io.File targetFolder)
archiveFile - the archive filetargetFolder - the target folderpublic boolean decompressFolder(java.io.File archiveFile,
java.io.File targetFolder,
ArchiveFileHandler.ArchiveFormat archiveFormat)
archiveFile - the archive filetargetFolder - the target folderarchiveFormat - the archive formatpublic boolean appendFolderToArchive(java.io.File folder,
java.io.File archiveFile,
java.io.File targetFile)
throws java.io.IOException
folder - the folderarchiveFile - the archive filejava.io.IOException - Signals that an I/O exception has occurred.public boolean appendFolderToArchive(java.io.File folder,
java.io.File archiveFile,
java.io.File targetFile,
java.lang.String pathInsideArchive)
throws java.io.IOException
folder - the folder to addarchiveFile - the archive file the original archivetargetFile - the new extended archivepathInsideArchive - the path inside archive for the new contentjava.io.IOException - Signals that an I/O exception has occurred.public boolean appendFolderToArchive(java.io.File folder,
java.io.File archiveFile,
java.io.File targetFile,
java.lang.String pathInsideArchive,
ArchiveFileHandler.ArchiveFormat archiveFormat)
folder - the folder to addarchiveFile - the archive file the original archivetargetFile - the new extended archivepathInsideArchive - the path inside archive for the new contentarchiveFormat - the archive formatpublic boolean appendFoldersToArchive(java.io.File archiveSourceFile,
java.io.File archiveTargetFile,
java.util.HashMap<java.io.File,java.lang.String> folders,
boolean deleteAfterwards)
archiveSourceFile - The original archivearchiveTargetFile - The resulting extended archivefolders - HashMap containing the folders to add as keys and their paths inside the archive as valuesdeleteAfterwards - if true, the folders will be deleted after integrating them into the archivepublic boolean appendFoldersToArchive(java.io.File archiveSourceFile,
java.io.File archiveTargetFile,
java.util.HashMap<java.io.File,java.lang.String> folders,
ArchiveFileHandler.ArchiveFormat archiveFormat,
boolean deleteAfterwards)
archiveSourceFile - The original archivearchiveTargetFile - The resulting extended archivefolders - HashMap containing the folders to add as keys and their paths inside the archive as valuesarchiveFormat - The archive formatdeleteAfterwards - if true, the folders will be deleted after integrating them into the archivepublic void addPathReplacement(java.lang.String replace,
java.lang.String replaceWith)
replace - the string to be replacedreplaceWith - the string to replace it withpublic void deletePathReplacement(java.lang.String dontReplace)
dontReplace -