Class PipeCommandInputImpl
- java.lang.Object
-
- com.anrisoftware.globalpom.exec.internal.pipeoutputs.PipeCommandInputImpl
-
- All Implemented Interfaces:
CommandInput,PipeCommandInput,Callable<CommandInput>
public class PipeCommandInputImpl extends Object implements PipeCommandInput
Pipes the read data from one stream to the standard input of the command.- Since:
- 1.11
- Author:
- Erwin Mueller, erwin.mueller@deventm.org
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandInputcall()Writes to the standard input to the connected stream.CommandInputclone()Clones the standard input writer.static CommandInputcreatePipeCommandInput(InputStream stream)voidsetBufferSize(int size)Sets the buffer size.voidsetOutput(OutputStream stream)Sets the stream that is connected to the standard input of the executed command.voidsetPipe(InputStream stream)Sets the stream that is read and piped to the standard input of the command.StringtoString()
-
-
-
Method Detail
-
createPipeCommandInput
public static CommandInput createPipeCommandInput(InputStream stream)
- Parameters:
stream- theInputStream- Returns:
- the
CommandInput - See Also:
PipeCommandInputFactory.create(InputStream)
-
setOutput
public void setOutput(OutputStream stream)
Description copied from interface:CommandInputSets the stream that is connected to the standard input of the executed command.- Specified by:
setOutputin interfaceCommandInput- Parameters:
stream- theOutputStream.
-
setPipe
public void setPipe(InputStream stream)
Description copied from interface:PipeCommandInputSets the stream that is read and piped to the standard input of the command.- Specified by:
setPipein interfacePipeCommandInput- Parameters:
stream- theInputStream.
-
setBufferSize
public void setBufferSize(int size)
Description copied from interface:PipeCommandInputSets the buffer size.- Specified by:
setBufferSizein interfacePipeCommandInput- Parameters:
size- the size in bytes.
-
clone
public CommandInput clone()
Description copied from interface:CommandInputClones the standard input writer. The cloned writer have the same connected output stream.- Specified by:
clonein interfaceCommandInput- Overrides:
clonein classObject- Returns:
- the cloned
CommandInput.
-
call
public CommandInput call() throws Exception
Description copied from interface:CommandInputWrites to the standard input to the connected stream.- Specified by:
callin interfaceCallable<CommandInput>- Specified by:
callin interfaceCommandInput- Throws:
Exception
-
-