Package org.im4java.core
Class ImageCommand
- java.lang.Object
-
- org.im4java.process.ProcessStarter
-
- org.im4java.core.ImageCommand
-
- All Implemented Interfaces:
ErrorConsumer
- Direct Known Subclasses:
CompositeCmd
,ConvertCmd
,DcrawCmd
,DisplayCmd
,ExiftoolCmd
,GraphicsMagickCmd
,IdentifyCmd
,ImageMagickCmd
,JpegtranCmd
,MogrifyCmd
,MontageCmd
,UFRawCmd
public class ImageCommand extends ProcessStarter implements ErrorConsumer
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
Constructors Constructor Description ImageCommand()
Constructor.ImageCommand(java.lang.String... pCommands)
Constructor setting the commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consumeError(java.io.InputStream pInputStream)
This method just saves the stderr-output into an internal field.void
run(Operation pOperation, java.lang.Object... images)
Execute the command (replace given placeholders).void
setCommand(java.lang.String... pCommands)
Set the command.-
Methods inherited from class org.im4java.process.ProcessStarter
addProcessListener, getIInputProvider, getIProcessListener, isAsyncMode, run, setAsyncMode, setErrorConsumer, setInputProvider, setOutputConsumer, startProcess, waitForProcess
-
-
-
-
Method Detail
-
setCommand
public void setCommand(java.lang.String... pCommands)
Set the command.
-
run
public void run(Operation pOperation, java.lang.Object... images) throws java.io.IOException, java.lang.InterruptedException, IM4JavaException
Execute the command (replace given placeholders).- Throws:
IM4JavaException
java.io.IOException
java.lang.InterruptedException
-
consumeError
public void consumeError(java.io.InputStream pInputStream) throws java.io.IOException
This method just saves the stderr-output into an internal field.- Specified by:
consumeError
in interfaceErrorConsumer
- Throws:
java.io.IOException
- See Also:
ErrorConsumer.consumeError(java.io.InputStream)
-
-