Class Lister
java.lang.Object
org.apache.commons.compress.archivers.Lister
Simple command line application that lists the contents of an archive.
The name of the archive must be given as a command line argument.
The optional second argument defines the archive type, in case the format is not recognized.
- Since:
- 1.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ArchiveInputStreamcreateArchiveInputStream(String[] args, InputStream fis) private static StringdetectFormat(File f) private static voidprivate static voidlistStream(File f, String[] args) private static voidprivate static voidstatic voidprivate static voidusage()
-
Field Details
-
FACTORY
-
-
Constructor Details
-
Lister
public Lister()
-
-
Method Details
-
main
- Throws:
Exception
-
listStream
- Throws:
ArchiveExceptionIOException
-
createArchiveInputStream
private static ArchiveInputStream createArchiveInputStream(String[] args, InputStream fis) throws ArchiveException - Throws:
ArchiveException
-
detectFormat
- Throws:
ArchiveExceptionIOException
-
list7z
- Throws:
ArchiveExceptionIOException
-
listZipUsingZipFile
- Throws:
ArchiveExceptionIOException
-
listZipUsingTarFile
- Throws:
ArchiveExceptionIOException
-
usage
private static void usage()
-