|
TrueZIP 6.8.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.io.samples.CommandLineUtility
abstract class CommandLineUtility
Abstract base class for command line utilities.
| Nested Class Summary | |
|---|---|
protected static class |
CommandLineUtility.IllegalUsageException
|
protected static class |
CommandLineUtility.ProgressMonitor
|
| Field Summary | |
|---|---|
protected PrintStream |
err
The print stream for error output. |
protected PrintStream |
out
The print stream for standard output. |
protected CommandLineUtility.ProgressMonitor |
progressMonitor
The command line progress monitor. |
| 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 |
configKeyManager()
Configure the key manager to use when prompting the user for keys for RAES encrypted ZIP files. |
int |
run(String[] args)
Runs this command line utility. |
abstract 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 CommandLineUtility.ProgressMonitor progressMonitor
| Constructor Detail |
|---|
protected CommandLineUtility()
CommandLineUtility(System.out, System.err, true).
protected CommandLineUtility(OutputStream out,
OutputStream err,
boolean autoFlush)
Warning: This constructor has side effects: If Swing based prompting is used, the Hurling Window Feedback is set for feedback on wrong key entry unless the respective system properties have been explicitly set.
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.PromptingKeyManager| Method Detail |
|---|
private static void configKeyManager()
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 boolean runWithException(String[] args)
throws CommandLineUtility.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.
CommandLineUtility.IllegalUsageException - If args does not contain
correct commands or parameters.
IOException - On any I/O related exception.
|
TrueZIP 6.8.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||