| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.NZip
public class NZip
A comprehensive command line utility which allows you to work
 with entries in all supported archive files using Unix like commands
 (cat, cp, rm, mkdir,
 rmdir, ls etc.).
 
 Please note that TrueZIP is designed for optimum performance.
 However, this utility features some optional archive drivers which
 provide additional safety or otherwise unavailable features.
 Some of these drivers are not used in their default configuration -
 see DefaultArchiveDetector for more
 information.
 For example, the ZIP drivers used in this utility always check
 the CRC-32 values provided in the ZIP file.
 In addition, the SFX driver is used which allows you to browse
 .exe files if they happen to be SelF eXtracting archives (SFX).
 If they are not however, TrueZIP may spend some considerable amount of
 time searching for the Central Directory required to be present in ZIP
 (and hence SFX) files.
 As a conclusion, this utility should not serve as a performance benchmark.
 
This class is not thread safe.
| Nested Class Summary | |
|---|---|
| protected static class | de.schlichtherle.CommandLineUtility.ProgressMonitor | 
|  class | NZip.IllegalUsageException | 
| Field Summary | |
|---|---|
| protected  PrintStream | errThe print stream for error output. | 
| protected  PrintStream | outThe print stream for standard output. | 
| protected  de.schlichtherle.CommandLineUtility.ProgressMonitor | progressMonitorThe command line progress monitor. | 
| Constructor Summary | |
|---|---|
| NZip() | |
| NZip(OutputStream out,
     OutputStream err,
     boolean autoFlush) | |
| Method Summary | |
|---|---|
| protected  DefaultArchiveDetector | createDefaultArchiveDetector()May be overridden by subclasses to create the ArchiveDetectorwhich shall be used as thedefault archive detectorwhile
 a command is running. | 
| protected  DefaultArchiveDetector | createDefaultArchiveDetector(String charset)May be overridden by subclasses to create the ArchiveDetectorwhich returnsArchiveDrivers
 which should use the specified charset if supported. | 
| static void | main(String[] args)Equivalent to System.exit(new NZip().run(args));. | 
|  int | run(String[] args)Runs this command line utility. | 
|  boolean | runWithException(String[] args)Runs this command line utility. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected final PrintStream out
protected final PrintStream err
protected final de.schlichtherle.CommandLineUtility.ProgressMonitor progressMonitor
| Constructor Detail | 
|---|
public NZip()
public NZip(OutputStream out,
            OutputStream err,
            boolean autoFlush)
| Method Detail | 
|---|
protected DefaultArchiveDetector createDefaultArchiveDetector()
ArchiveDetector
 which shall be used as the
 default archive detector while
 a command is running.
 The ArchiveDrivers returned
 by the archive detector should use their default charsets.
 Note that the archive detector which is returned by the implementation in this class uses some archive drivers which may be pretty slow due to some extra compatibility tests which they perform on every archive.
protected DefaultArchiveDetector createDefaultArchiveDetector(String charset)
ArchiveDetector
 which returns ArchiveDrivers
 which should use the specified charset if supported.
 This is used by selected commands in this class.
 Note that the archive detector which is returned by the implementation in this class uses some archive drivers which may be pretty slow due to some extra compatibility tests which they perform on every archive.
public static void main(String[] args)
System.exit(new NZip().run(args));.
public boolean runWithException(String[] args)
                         throws NZip.IllegalUsageException,
                                IOException
args - A non-empty array of Unix-like commands and optional
        parameters.
false iff the command is a test which fails,
         true otherwise.
NZip.IllegalUsageException - If args does not contain
         correct commands or parameters.
IOException - On any I/O related exception.public final int run(String[] args)
args - A non-empty array of Unix-like commands and optional
        parameters.
1 iff the command fails,
         0 otherwise.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||