This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
com.github.junrar.Archive
SeregaMamonT edited this page Jan 22, 2013
·
4 revisions
Archive represents RAR archive. It is the main class of the library - it contains main logic of unpacking.
-
Archive(VolumeManager volumeManager) throws RarException, IOException
- creates Archive to unpack volumes stored in volumeManager -
Archive(File firstVolume) throws RarException, IOException
- creates archive to unpack a single file firstVolume -
Archive(File firstVolume, UnrarCallback unrarCallback)
- creates Archive to unpack a single file firstVolume with an event listener UnrarCallback.
-
FileHeader nextFileHeader()
- returns next foundFileHeader
object containing information about packed file -
List<FileHeader> getFileHeaders()
- returns the list with information about all files in the archive -
MainHeader getMainHeader()
- returns the main header of this archive which holds information concerning the whole archive (solid, encrypted etc) -
boolean isOldFormat()
- returns whether the archive is old format (2.9 and lower)
- void extractFile(FileHeader hd, OutputStream os) throws RarException - unpacks file with the specified by its FileHeader hd to the OutputStream os
-
InputStream getInputStream(final FileHeader hd) throws RarException, IOException
- returns an InputStream that will allow to read the file and stream it. Please note that this method will create a new Thread and an a pair of Pipe streams.
-
void close() throws IOException
- close the underlying compressed file