Class PipeCommandOutputImpl
- java.lang.Object
-
- com.anrisoftware.globalpom.exec.internal.pipeoutputs.PipeCommandOutputImpl
-
- All Implemented Interfaces:
CommandOutput,PipeCommandOutput,Callable<CommandOutput>
public class PipeCommandOutputImpl extends Object implements PipeCommandOutput
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandOutputcall()Reads the standard output from the connected stream.CommandOutputclone()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.StringtoString()
-
-
-
Method Detail
-
createPipeCommandOutput
public static CommandOutput createPipeCommandOutput(OutputStream stream)
- Parameters:
stream- theOutputStream- Returns:
- the
CommandOutput - See Also:
PipeCommandOutputFactory.create(OutputStream)
-
setInput
public void setInput(InputStream stream)
Description copied from interface:CommandOutputSets the stream that is connected to output of the executed command.- Specified by:
setInputin interfaceCommandOutput- Parameters:
stream- theInputStream.
-
setPipe
public void setPipe(OutputStream stream)
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
public CommandOutput 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
public CommandOutput call() throws Exception
Description copied from interface:CommandOutputReads the standard output from the connected stream.- Specified by:
callin interfaceCallable<CommandOutput>- Specified by:
callin interfaceCommandOutput- Throws:
Exception
-
-