IArchiveFileEntry

public interface IArchiveFileEntry

This interface represents an archive file entry.

Methods

MethodDescription
extract(OutputStream destination)Extracts the entry to the stream provided.
extract(String path)Extracts the entry to the filesystem by the path provided.
getLength()Gets the length of the entry in bytes.
getName()Gets the name of the entry.

extract(OutputStream destination)

public abstract void extract(OutputStream destination)

Extracts the entry to the stream provided.

Parameters:

ParameterTypeDescription
destinationjava.io.OutputStreamdestination stream. Must be writable

extract(String path)

public abstract File extract(String path)

Extracts the entry to the filesystem by the path provided.

Parameters:

ParameterTypeDescription
pathjava.lang.Stringthe path to destination file. If the file already exists, it will be overwritten

Returns: java.io.File - FileInfo instance containing extracted data

getLength()

public abstract Long getLength()

Gets the length of the entry in bytes.

Returns: java.lang.Long - the length of the entry in bytes

getName()

public abstract 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: java.lang.String - the name of the entry