|
The im4java Library, Version 1.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.im4java.process.ProcessStarter org.im4java.core.ImageCommand
public class ImageCommand
This class implements the processing of image operations. It replaces placeholders within the argument-stack and passes all arguments to the generic run-method of ProcessStarter.
Field Summary |
---|
Fields inherited from class org.im4java.process.ProcessStarter |
---|
BUFFER_SIZE |
Constructor Summary | |
---|---|
ImageCommand()
Constructor. |
|
ImageCommand(java.lang.String... pCommands)
Constructor setting the commands. |
Method Summary | |
---|---|
void |
consumeError(java.io.InputStream pInputStream)
This method just saves the stderr-output into an internal field. |
void |
createScript(java.io.PrintWriter pWriter,
Operation pOp,
java.util.Properties pProps)
Generate a script. |
void |
createScript(java.lang.String pFilename,
Operation pOp)
Generate a script. |
void |
createScript(java.lang.String pFilename,
Operation pOp,
java.util.Properties pProps)
Generate a script. |
protected void |
finished(int pReturnCode)
Post-processing after the process has terminated. |
java.util.LinkedList<java.lang.String> |
getCommand()
Get the command. |
java.util.ArrayList<java.lang.String> |
getErrorText()
Get the error-text associated with this command (might be null). |
ProcessTask |
getProcessTask(Operation pOperation,
java.lang.Object... images)
Return a ProcessTask for future execution (replace given placeholders). |
void |
run(Operation pOperation,
java.lang.Object... images)
Execute the command (replace given placeholders). |
void |
setCommand(java.lang.String... pCommands)
Set the command. |
static void |
setDefaultScriptGenerator(ScriptGenerator pGen)
Set the default ScriptGenerator. |
void |
setScriptGenerator(ScriptGenerator pGen)
Set the ScriptGenerator. |
Methods inherited from class org.im4java.process.ProcessStarter |
---|
addProcessEventListener, addProcessListener, finished, getGlobalSearchPath, getPID, getProcessTask, getSearchPath, isAsyncMode, removeProcessEventListener, run, searchForCmd, setAsyncMode, setErrorConsumer, setGlobalSearchPath, setInputProvider, setOutputConsumer, setPID, setPIDCounter, setSearchPath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageCommand()
public ImageCommand(java.lang.String... pCommands)
Method Detail |
---|
public void setCommand(java.lang.String... pCommands)
public java.util.LinkedList<java.lang.String> getCommand()
public java.util.ArrayList<java.lang.String> getErrorText()
public void run(Operation pOperation, java.lang.Object... images) throws java.io.IOException, java.lang.InterruptedException, IM4JavaException
pOperation
- The Operation to executeimages
- Zero or more images (replace placeholders in pOperation)
IOException,
- InterruptedException, IM4JavaException
java.io.IOException
java.lang.InterruptedException
IM4JavaException
public ProcessTask getProcessTask(Operation pOperation, java.lang.Object... images) throws java.io.IOException, IM4JavaException
pOperation
- The Operation to executeimages
- Zero or more images (replace placeholders in pOperation)
IOException,
- IM4JavaException
java.io.IOException
IM4JavaException
protected void finished(int pReturnCode) throws java.lang.Exception
finished
in class ProcessStarter
pReturnCode
- the return-code of the process
java.lang.Exception
public void consumeError(java.io.InputStream pInputStream) throws java.io.IOException
consumeError
in interface ErrorConsumer
java.io.IOException
ErrorConsumer.consumeError(java.io.InputStream)
public static void setDefaultScriptGenerator(ScriptGenerator pGen)
public void setScriptGenerator(ScriptGenerator pGen)
public void createScript(java.io.PrintWriter pWriter, Operation pOp, java.util.Properties pProps)
public void createScript(java.lang.String pFilename, Operation pOp, java.util.Properties pProps) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void createScript(java.lang.String pFilename, Operation pOp) throws java.io.FileNotFoundException
java.io.FileNotFoundException
|
The im4java Library, Version 1.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |