Class PipeCommandInputImpl
java.lang.Object
com.anrisoftware.globalpom.exec.internal.pipeoutputs.PipeCommandInputImpl
- All Implemented Interfaces:
CommandInput,PipeCommandInput,Callable<CommandInput>
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
Modifier and TypeMethodDescriptioncall()Writes to the standard input to the connected stream.clone()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.toString()
-
Method Details
-
createPipeCommandInput
- Parameters:
stream- theInputStream- Returns:
- the
CommandInput - See Also:
-
setOutput
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
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
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
Description copied from interface:CommandInputWrites to the standard input to the connected stream.- Specified by:
callin interfaceCallable<CommandInput>- Specified by:
callin interfaceCommandInput- Throws:
Exception
-
toString
-