public interface Archiver
Compressor to compress and decompress their respective archive files.| Modifier and Type | Method and Description |
|---|---|
java.io.File |
create(java.lang.String archive,
java.io.File destination,
java.io.File... sources)
Creates an archive from the given source files or directories, and saves it into the given destination.
|
java.io.File |
create(java.lang.String archive,
java.io.File destination,
java.io.File source)
Creates an archive from the given source file or directory, and saves it into the given destination.
|
void |
extract(java.io.File archive,
java.io.File destination)
Extracts the given archive file into the given destination directory.
|
void |
extract(java.io.InputStream archive,
java.io.File destination)
Extracts the given archive supplied as an input stream into the given destination directory.
|
java.lang.String |
getFilenameExtension()
Returns the filename extension that indicates the file format this archiver handles.
|
ArchiveStream |
stream(java.io.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. |
java.io.File create(java.lang.String archive,
java.io.File destination,
java.io.File source)
throws java.io.IOException
archive - the name of the archive to createdestination - the destination directory where to place the created archivesource - the input file or directory to archivejava.io.IOException - propagated I/O errors by java.iojava.io.File create(java.lang.String archive,
java.io.File destination,
java.io.File... sources)
throws java.io.IOException
archive - the name of the archive to createdestination - the destination directory where to place the created archivesources - the input files or directories to archivejava.io.IOException - propagated I/O errors by java.iovoid extract(java.io.File archive,
java.io.File destination)
throws java.io.IOException
archive - the archive file to extractdestination - the directory to which to extract the filesjava.io.IOException - propagated I/O errors by java.iovoid extract(java.io.InputStream archive,
java.io.File destination)
throws java.io.IOException
archive - the archive contents as a stream.destination - the destination directory.java.io.IOExceptionArchiveStream stream(java.io.File archive) throws java.io.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 streamjava.io.IOException - propagated I/O errors by java.iojava.lang.String getFilenameExtension()
Copyright © 2013-2018. All Rights Reserved.