|
TrueZIP Samples 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.sample.file.app.CommandLineUtility
abstract class CommandLineUtility
Abstract base class for command line utilities.
| Nested Class Summary | |
|---|---|
protected static class |
CommandLineUtility.IllegalUsageException
Indicates illegal application parameters. |
protected static class |
CommandLineUtility.ProgressMonitor
Monitors progress when committing unsynchronized changes to the contents of archive files. |
| Field Summary | |
|---|---|
protected PrintStream |
err
The print stream for error output. |
protected CommandLineUtility.ProgressMonitor |
monitor
The command line progress monitor. |
protected PrintStream |
out
The print stream for standard output. |
| Constructor Summary | |
|---|---|
protected |
CommandLineUtility()
Equivalent to CommandLineUtility(System.out, System.err, true). |
protected |
CommandLineUtility(OutputStream out,
OutputStream err,
boolean autoFlush)
Constructs a new command line utility instance. |
| Method Summary | |
|---|---|
private static void |
configureFeedback()
Configure the type of the feedback when prompting the user for keys for RAES encrypted ZIP files using the Swing based prompting key manager. |
private static void |
configureManagerService()
|
int |
run(String[] args)
Runs this command line utility. |
abstract int |
runChecked(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 CommandLineUtility.ProgressMonitor monitor
| Constructor Detail |
|---|
protected CommandLineUtility()
CommandLineUtility(System.out, System.err, true).
protected CommandLineUtility(OutputStream out,
OutputStream err,
boolean autoFlush)
Note that this constructor has side effects:
SampleManagerProvider class is set for
obtaining statistics when synchronizing any uncommitted changes to
the contents of archive files.
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 as the additional constructor parameter.| Method Detail |
|---|
private static void configureFeedback()
private static void configureManagerService()
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.
public abstract int runChecked(String[] args)
throws CommandLineUtility.IllegalUsageException,
IOException
args - a non-null array of command line parameters.
System.exit(int).
CommandLineUtility.IllegalUsageException - If args does not contain
correct commands or parameters.
IOException - On any I/O related exception.
|
TrueZIP Samples 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||