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
- IOException
public void archiveFile(String from, String to) throws IOException
from
- to
- IOException
public String[] check(String archive) throws IOException
archive
- IOException
public void extract(String archive, String extractDir) throws IOException
IOException
public void extractFromStream(InputStream inputStream, String extractDir) throws IOException
IOException
protected void zipDir(File zipDir, ZipOutputStream zos) throws IOException
IOException
Copyright © 2016 WSO2 Inc. All rights reserved.