abstract class Application extends de.schlichtherle.truezip.file.TApplication<RuntimeException>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Application.IllegalUsageException
Indicates illegal application parameters.
|
| Modifier and Type | Field and Description |
|---|---|
protected PrintStream |
err
The print stream for error output.
|
protected PrintStream |
out
The print stream for standard output.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Application()
Equivalent to
Application(System.out, System.err, true). |
protected |
Application(OutputStream out,
OutputStream err,
boolean autoFlush)
Constructs a new command line utility instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract int |
runChecked(String[] args)
Runs this command line utility.
|
protected void |
setup()
Configures the type of the feedback when prompting the user for keys
for RAES encrypted ZIP alias ZIP.RAES alias TZP files by the Swing
based prompting key manager.
|
protected int |
work(String[] args)
Runs the work phase by calling
runChecked(java.lang.String[]). |
protected final PrintStream err
protected final PrintStream out
protected Application()
Application(System.out, System.err, true).protected Application(OutputStream out, OutputStream err, boolean autoFlush)
out - the standard output stream.err - the error output stream.autoFlush - if the output streams are not PrintStreams,
then they are wrapped in a new PrintStream with
this value as the additional constructor parameter.protected abstract int runChecked(String[] args) throws Exception
Avoid repeating this method and updating the same archive file upon each call! This would degrade the overall performance from O(n) to O(m*n), where m is the number of new or modified entries and n is the number of all entries in the archive file!
args - an array of arguments for this command line utility.exit status of the VM.Exception - on any exception.protected void setup()
setup in class de.schlichtherle.truezip.file.TApplication<RuntimeException>protected final int work(String[] args)
runChecked(java.lang.String[]).
Prints a user readable error message to the error output stream
which was provided to the constructor if an occurs.
This method is run at least once and repeatedly called
until runChecked(java.lang.String[]) returns a non-negative integer for use as the
exist status of the VM.
After this method, the TApplication.sync() method is called in a
finally-block.
work in class de.schlichtherle.truezip.file.TApplication<RuntimeException>args - an array of arguments for this command line utility.exit status of the VM.RuntimeException - at the discretion of runChecked(java.lang.String[]).Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.