|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.at4j.support.prog.AbstractProgram
org.at4j.comp.prog.AbstractStreamCompressionProgram<T>
T - The class containing the parsed command line arguments for the
command.public abstract class AbstractStreamCompressionProgram<T extends StreamCompressionProgramArguments>
An abstract base class for compression programs that use streams to compress and decompress data.
| Constructor Summary | |
|---|---|
AbstractStreamCompressionProgram()
|
|
| Method Summary | |
|---|---|
protected abstract InputStream |
createInputStream(int sourceNo,
T settings)
Create an input stream on the source entity for the given command line arguments. |
protected abstract OutputStream |
createOutputStream(int targetNo,
T settings)
Create an output stream on the target entity for the given command line arguments. |
protected abstract T |
parseCommandLine(String[] args)
Subclasses implement this to parse their command line. |
protected void |
postProcess(int sourceNo,
T settings)
Subclasses may override this for postprocessing the source and/or target entity. |
protected void |
run(String[] args)
|
| Methods inherited from class org.at4j.support.prog.AbstractProgram |
|---|
getArg, getParentLocation, isFlagArgument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractStreamCompressionProgram()
| Method Detail |
|---|
protected abstract T parseCommandLine(String[] args)
throws CommandErrorException
args - The command line arguments, unparsed.
CommandErrorException - If the commands were invalid.
protected abstract InputStream createInputStream(int sourceNo,
T settings)
throws IOException,
IgnoreFileException
sourceNo - The index number for the source entity. The first source
has index == 0.settings - The command line arguments.
IOException - On I/O errors.
IgnoreFileException - If the file should be ignored for some
reason.
protected abstract OutputStream createOutputStream(int targetNo,
T settings)
throws IOException,
IgnoreFileException
targetNo - The index number for the target entity. The first target
has index == 0.settings - The command line arguments.
IOException - On I/O errors.
IgnoreFileException - If the file should be ignored for some
reason.
protected void postProcess(int sourceNo,
T settings)
throws IOException
sourceNo - The index number for the source and target entities.settings - The command line arguments.
IOException - On I/O errors.
protected void run(String[] args)
throws CommandErrorException,
IOException
CommandErrorException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||