public class ArchiveManipulator extends Object
| Constructor and Description |
|---|
ArchiveManipulator() |
| Modifier and Type | Method and Description |
|---|---|
void |
archiveDir(String destArchive,
String sourceDir)
Archive a directory
|
void |
archiveFile(String from,
String to)
Archive a file
|
String[] |
check(String archive)
List the contents of an archive
|
void |
extract(String archive,
String extractDir) |
void |
extractFromStream(InputStream inputStream,
String extractDir) |
protected String |
getZipEntryPath(File f) |
protected void |
zipDir(File zipDir,
ZipOutputStream zos) |
public void archiveDir(String destArchive, String sourceDir) throws IOException
destArchive - 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
IOExceptionpublic void extractFromStream(InputStream inputStream, String extractDir) throws IOException
IOExceptionprotected void zipDir(File zipDir, ZipOutputStream zos) throws IOException
IOExceptionCopyright © 2018 WSO2 Inc. All rights reserved.