public interface Archiver
Compressor to compress and decompress their respective archive files.| Modifier and Type | Method and Description |
|---|---|
File |
create(String archive,
File destination,
File... sources)
Creates an archive from the given source files or directories, and saves it into the given destination.
|
void |
extract(File archive,
File destination)
Extracts the given archive file into the given destination directory.
|
String |
getFilenameExtension()
Returns the filename extension that indicates the file format this archiver handles.
|
ArchiveStream |
stream(File archive)
Reads the given archive file as an
ArchiveStream which is used to access individual ArchiveEntry
objects within the archive without extracting the archive onto the file system. |
File create(String archive, File destination, File... sources) throws IOException
archive - the name of the archive to createdestination - the destination directory where to place the created archivesources - the input files or directories to archiveIOException - propagated I/O errors by java.iovoid extract(File archive, File destination) throws IOException
archive - the archive file to extractdestination - the directory to which to extract the filesIOException - propagated I/O errors by java.ioArchiveStream stream(File archive) throws IOException
ArchiveStream which is used to access individual ArchiveEntry
objects within the archive without extracting the archive onto the file system.archive - the archive file to streamIOException - propagated I/O errors by java.ioString getFilenameExtension()
Copyright © 2013-2014. All Rights Reserved.