Class Junrar
java.lang.Object
com.github.junrar.Junrar
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ArchivecreateArchiveOrThrowException(VolumeManager volumeManager, String password) private static ArchivecreateArchiveOrThrowException(File file, String password) private static ArchivecreateArchiveOrThrowException(InputStream rarAsStream, String password) extract(VolumeManager volumeManager, File destinationFolder) extract(VolumeManager volumeManager, File destinationFolder, String password) extract(InputStream resourceAsStream, File destinationFolder) extract(InputStream resourceAsStream, File destinationFolder, String password) extractArchiveTo(Archive arch, LocalFolderExtractor destination) static List<ContentDescription> static List<ContentDescription> getContentsDescription(InputStream resourceAsStream) private static List<ContentDescription> private static FiletryToExtract(LocalFolderExtractor destination, Archive arch, FileHeader fileHeader) private static voidvalidateDestinationPath(File destinationFolder) private static voidvalidateRarPath(File rar)
-
Field Details
-
logger
private static final org.slf4j.Logger logger
-
-
Constructor Details
-
Junrar
public Junrar()
-
-
Method Details
-
extract
public static List<File> extract(String rarPath, String destinationPath) throws IOException, RarException - Throws:
IOExceptionRarException
-
extract
public static List<File> extract(String rarPath, String destinationPath, String password) throws IOException, RarException - Throws:
IOExceptionRarException
-
extract
- Throws:
RarExceptionIOException
-
extract
public static List<File> extract(File rar, File destinationFolder, String password) throws RarException, IOException - Throws:
RarExceptionIOException
-
extract
public static List<File> extract(InputStream resourceAsStream, File destinationFolder) throws RarException, IOException - Throws:
RarExceptionIOException
-
extract
public static List<File> extract(InputStream resourceAsStream, File destinationFolder, String password) throws RarException, IOException - Throws:
RarExceptionIOException
-
extract
public static List<File> extract(VolumeManager volumeManager, File destinationFolder) throws IOException, RarException - Throws:
IOExceptionRarException
-
extract
public static List<File> extract(VolumeManager volumeManager, File destinationFolder, String password) throws IOException, RarException - Throws:
IOExceptionRarException
-
getContentsDescription
public static List<ContentDescription> getContentsDescription(File rar) throws RarException, IOException - Throws:
RarExceptionIOException
-
getContentsDescription
public static List<ContentDescription> getContentsDescription(InputStream resourceAsStream) throws RarException, IOException - Throws:
RarExceptionIOException
-
getContentsDescriptionFromArchive
private static List<ContentDescription> getContentsDescriptionFromArchive(Archive arch) throws RarException, IOException - Throws:
RarExceptionIOException
-
createArchiveOrThrowException
private static Archive createArchiveOrThrowException(VolumeManager volumeManager, String password) throws RarException, IOException - Throws:
RarExceptionIOException
-
createArchiveOrThrowException
private static Archive createArchiveOrThrowException(InputStream rarAsStream, String password) throws RarException, IOException - Throws:
RarExceptionIOException
-
createArchiveOrThrowException
private static Archive createArchiveOrThrowException(File file, String password) throws RarException, IOException - Throws:
RarExceptionIOException
-
validateDestinationPath
-
validateRarPath
-
extractArchiveTo
private static List<File> extractArchiveTo(Archive arch, LocalFolderExtractor destination) throws IOException, RarException - Throws:
IOExceptionRarException
-
tryToExtract
private static File tryToExtract(LocalFolderExtractor destination, Archive arch, FileHeader fileHeader) throws IOException, RarException - Throws:
IOExceptionRarException
-