Package com.aspose.zip
Interface IArchive
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
Archive,ArjArchive,Bzip2Archive,CabArchive,CpioArchive,GzipArchive,IsoArchive,LhaArchive,Lz4Archive,LzipArchive,LzmaArchive,LzxArchive,RarArchive,SevenZipArchive,SnappyArchive,TarArchive,UueArchive,WimArchive,XarArchive,XzArchive,ZArchive,ZstandardArchive
public interface IArchive extends AutoCloseable
This interface represents an archive.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()voidextractToDirectory(String destinationDirectory)Extracts all the files in the archive to the directory provided.Iterable<IArchiveFileEntry>getFileEntries()Gets entries ofIArchiveFileEntrytype constituting the archive.ArchiveFormatgetFormat()Gets the archive format.
-
-
-
Method Detail
-
getFileEntries
Iterable<IArchiveFileEntry> getFileEntries()
Gets entries of
IArchiveFileEntrytype constituting the archive.Archives for compression only, such as gzip, bzip2, lzip, lzma, lz4, xz, z consist of the single record - the archive itself.
- Returns:
- entries of
IArchiveFileEntrytype constituting the archive.
-
extractToDirectory
void extractToDirectory(String destinationDirectory)
Extracts all the files in the archive to the directory provided.
If the directory does not exist, it will be created.
- Parameters:
destinationDirectory- The path to the directory to place the extracted files in.
-
getFormat
ArchiveFormat getFormat()
Gets the archive format.
- Returns:
- the archive format
-
close
void close()
- Specified by:
closein interfaceAutoCloseable
-
-