Class PipeCommandOutputImpl
java.lang.Object
com.anrisoftware.globalpom.exec.internal.pipeoutputs.PipeCommandOutputImpl
- All Implemented Interfaces:
CommandOutput,PipeCommandOutput,Callable<CommandOutput>
Pipes the read data from the output of the command to a stream.
- Since:
- 1.11
- Author:
- Erwin Mueller, erwin.mueller@deventm.org
-
Method Summary
Modifier and TypeMethodDescriptioncall()Reads the standard output from the connected stream.clone()Clones the standard output reader.static CommandOutputcreatePipeCommandOutput(OutputStream stream) voidsetBufferSize(int size) Sets the buffer size.voidsetInput(InputStream stream) Sets the stream that is connected to output of the executed command.voidsetPipe(OutputStream stream) Sets the stream that is filled with the piped to the output of the command.toString()
-
Method Details
-
createPipeCommandOutput
- Parameters:
stream- theOutputStream- Returns:
- the
CommandOutput - See Also:
-
setInput
Description copied from interface:CommandOutputSets the stream that is connected to output of the executed command.- Specified by:
setInputin interfaceCommandOutput- Parameters:
stream- theInputStream.
-
setPipe
Description copied from interface:PipeCommandOutputSets the stream that is filled with the piped to the output of the command.- Specified by:
setPipein interfacePipeCommandOutput- Parameters:
stream- theOutputStream.
-
setBufferSize
public void setBufferSize(int size) Description copied from interface:PipeCommandOutputSets the buffer size.- Specified by:
setBufferSizein interfacePipeCommandOutput- Parameters:
size- the size in bytes.
-
clone
Description copied from interface:CommandOutputClones the standard output reader. The cloned reader have the same connected input stream.- Specified by:
clonein interfaceCommandOutput- Overrides:
clonein classObject- Returns:
- the cloned
CommandOutput.
-
call
Description copied from interface:CommandOutputReads the standard output from the connected stream.- Specified by:
callin interfaceCallable<CommandOutput>- Specified by:
callin interfaceCommandOutput- Throws:
Exception
-
toString
-