public class ZipArchiver extends Archiver
Constructor and Description |
---|
ZipArchiver() |
Modifier and Type | Method and Description |
---|---|
void |
compress(File inputDir,
File output)
Archive a directory into a file.
|
void |
decompress(File input,
File outputDir)
Expand an archive into a directory.
|
String |
getFileExtension()
Return the file extension used by the archiver.
|
compressDirectory, decompress, validateFiles
public void compress(File inputDir, File output) throws IOException
Archiver
compress
in class Archiver
inputDir
- Directory to be compressed.output
- Target file for the zip contents. If the file exists it will be overwritten.FileNotFoundException
- if source does not existIOException
- For other IO errorspublic void decompress(File input, File outputDir) throws IOException
Archiver
decompress
in class Archiver
input
- Zip file to be expandedoutputDir
- Target directory. Files will be overwrittenFileNotFoundException
- if source does not existIOException
- For other IO errorspublic String getFileExtension()
Archiver
getFileExtension
in class Archiver
Copyright © 2002-2020 Atlassian. All Rights Reserved.