public class ArchiveManipulator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
archiveSourceDir |
| Constructor and Description |
|---|
ArchiveManipulator() |
| Modifier and Type | Method and Description |
|---|---|
void |
archiveDir(File destArchive,
File sourceDir) |
void |
archiveDir(String destArchiveName,
String sourceDir)
Utility method to archive the given directory
|
void |
archiveFile(String from,
String to)
Utility method to archive the given file
|
String[] |
check(String archive)
List the contents of an archive
|
void |
extract(File archive,
File extractDir)
Utility method to extract an archive
|
void |
extract(String archive,
String extractDir)
Utility method to extract an archive
|
void |
extractFromStream(InputStream inputStream,
String extractDir)
Utility method to extract form a stream to a given directory
|
protected String archiveSourceDir
public void archiveDir(File destArchive, File sourceDir) throws IOException
IOExceptionpublic void archiveDir(String destArchiveName, String sourceDir) throws IOException
destArchiveName - sourceDir - IOExceptionpublic void archiveFile(String from, String to) throws IOException
from - to - IOExceptionpublic String[] check(String archive) throws IOException
archive - IOExceptionpublic void extract(String archive, String extractDir) throws IOException
archive - extractDir - IOExceptionpublic void extract(File archive, File extractDir) throws IOException
archive - extractDir - IOExceptionpublic void extractFromStream(InputStream inputStream, String extractDir) throws IOException
inputStream - extractDir - IOExceptionCopyright © 2024 WSO2. All rights reserved.