Package com.aspose.zip
Interface IArchiveFileEntry
-
- All Known Implementing Classes:
ArchiveEntry,ArchiveEntryEncrypted,ArchiveEntryPlain,ArjEntryPlain,Bzip2Archive,CabEntry,CpioEntry,GzipArchive,IsoEntry,LhaArchiveEntry,Lz4Archive,LzipArchive,LzmaArchive,LzxArchiveEntry,RarArchiveEntry,RarArchiveEntryEncrypted,RarArchiveEntryPlain,SevenZipArchiveEntry,SevenZipArchiveEntryEncrypted,SevenZipArchiveEntryPlain,SnappyArchive,TarEntry,UueArchive,WimFileEntry,XarFileEntry,XzArchive,ZArchive,ZstandardArchive
public interface IArchiveFileEntryThis interface represents an archive file entry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidextract(OutputStream destination)Extracts the entry to the stream provided.Fileextract(String path)Extracts the entry to the filesystem by the path provided.LonggetLength()Gets the length of the entry in bytes.StringgetName()Gets the name of the entry.
-
-
-
Method Detail
-
getName
String getName()
Gets the name of the entry.
Archives for compression only, such as gzip, bzip2, lzip, lzma, xz, z has name "File.bin" unless another name can be found in headers.
- Returns:
- the name of the entry
-
getLength
Long getLength()
Gets the length of the entry in bytes.
- Returns:
- the length of the entry in bytes
-
extract
File extract(String path)
Extracts the entry to the filesystem by the path provided.
- Parameters:
path- the path to destination file. If the file already exists, it will be overwritten- Returns:
Fileinstance containing extracted data
-
extract
void extract(OutputStream destination)
Extracts the entry to the stream provided.
- Parameters:
destination- destination stream. Must be writable
-
-