Class Lister
- java.lang.Object
-
- org.apache.commons.compress.archivers.Lister
-
public final class Lister extends java.lang.ObjectSimple 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 Modifier and Type Field Description private static ArchiveStreamFactoryFACTORY
-
Constructor Summary
Constructors Constructor Description Lister()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static ArchiveInputStreamcreateArchiveInputStream(java.lang.String[] args, java.io.InputStream fis)private static java.lang.StringdetectFormat(java.io.File f)private static voidlist7z(java.io.File f)private static voidlistStream(java.io.File f, java.lang.String[] args)private static voidlistZipUsingTarFile(java.io.File f)private static voidlistZipUsingZipFile(java.io.File f)static voidmain(java.lang.String[] args)private static voidusage()
-
-
-
Field Detail
-
FACTORY
private static final ArchiveStreamFactory FACTORY
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
listStream
private static void listStream(java.io.File f, java.lang.String[] args) throws ArchiveException, java.io.IOException- Throws:
ArchiveExceptionjava.io.IOException
-
createArchiveInputStream
private static ArchiveInputStream createArchiveInputStream(java.lang.String[] args, java.io.InputStream fis) throws ArchiveException
- Throws:
ArchiveException
-
detectFormat
private static java.lang.String detectFormat(java.io.File f) throws ArchiveException, java.io.IOException- Throws:
ArchiveExceptionjava.io.IOException
-
list7z
private static void list7z(java.io.File f) throws ArchiveException, java.io.IOException- Throws:
ArchiveExceptionjava.io.IOException
-
listZipUsingZipFile
private static void listZipUsingZipFile(java.io.File f) throws ArchiveException, java.io.IOException- Throws:
ArchiveExceptionjava.io.IOException
-
listZipUsingTarFile
private static void listZipUsingTarFile(java.io.File f) throws ArchiveException, java.io.IOException- Throws:
ArchiveExceptionjava.io.IOException
-
usage
private static void usage()
-
-