org.wso2.carbon.utils
Class ArchiveManipulator
java.lang.Object
org.wso2.carbon.utils.ArchiveManipulator
public class ArchiveManipulator
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArchiveManipulator
public ArchiveManipulator()
archiveDir
public void archiveDir(String destArchive,
String sourceDir)
throws IOException
- Archive a directory
- Parameters:
destArchive - sourceDir -
- Throws:
IOException
archiveFile
public void archiveFile(String from,
String to)
throws IOException
- Archive a file
- Parameters:
from - to -
- Throws:
IOException
check
public String[] check(String archive)
throws IOException
- List the contents of an archive
- Parameters:
archive -
- Returns:
- List of Zip Entries
- Throws:
IOException
extract
public void extract(String archive,
String extractDir)
throws IOException
- Throws:
IOException
extractFromStream
public void extractFromStream(InputStream inputStream,
String extractDir)
throws IOException
- Throws:
IOException
zipDir
protected void zipDir(File zipDir,
ZipOutputStream zos)
throws IOException
- Throws:
IOException
getZipEntryPath
protected String getZipEntryPath(File f)
Copyright © 2014 WSO2 Inc. All rights reserved.