Class ProcessStreamFactory
- java.lang.Object
-
- com.github.toolarium.system.command.process.stream.ProcessStreamFactory
-
public final class ProcessStreamFactory extends java.lang.ObjectThe process stream factory
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IProcessInputStreamgetEmptyStandardIn()Get the standard in as process input streamstatic ProcessStreamFactorygetInstance()Get the instanceProcessBufferOutputStreamgetProcessBufferOutputStream()Get a process output stream bufferProcessBufferOutputStreamgetProcessBufferOutputStream(java.lang.String linePrefix)Get a process output stream bufferProcessBufferOutputStreamgetProcessBufferOutputStream(java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)Get a process output stream bufferIProcessOutputStreamgetProcessOutputStream(java.io.OutputStream os)Get a process output stream which is wrapped by aOutputStream.IProcessOutputStreamgetProcessOutputStream(java.io.OutputStream os, java.lang.String linePrefix)Get a process output stream which is wrapped by aOutputStream.IProcessOutputStreamgetProcessOutputStream(java.io.OutputStream os, java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)Get a process output stream which is wrapped by aOutputStream.IProcessOutputStreamgetSlf4jProcessOutputStream()Get a process output stream bufferIProcessStreamExceptionHandlergetSlf4jProcessStreamExceptionHandler()Get the standard in as process input streamIProcessOutputStreamgetStandardErr()Get the standard out as process error streamIProcessOutputStreamgetStandardErr(java.lang.String linePrefix)Get the standard out as process error streamIProcessOutputStreamgetStandardErr(java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)Get the standard out as process error streamIProcessStreamExceptionHandlergetStandardErrProcessStreamExceptionHandler()Get the standard in as process input streamIProcessInputStreamgetStandardIn()Get the standard in as process input streamIProcessInputStreamgetStandardInFromBuffer(java.lang.String buffer)Get the standard in read from the buffer as process input streamIProcessInputStreamgetStandardInFromFile(java.io.File file)Get the standard in as process input streamIProcessOutputStreamgetStandardOut()Get the standard out as process output streamIProcessOutputStreamgetStandardOut(java.lang.String linePrefix)Get the standard out as process output streamIProcessOutputStreamgetStandardOut(java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)Get the standard out as process output streamIProcessStreamExceptionHandlergetStandardOutProcessStreamExceptionHandler()Get the standard in as process input stream
-
-
-
Method Detail
-
getInstance
public static ProcessStreamFactory getInstance()
Get the instance- Returns:
- the instance
-
getStandardOut
public IProcessOutputStream getStandardOut()
Get the standard out as process output stream- Returns:
- the process output stream
-
getStandardOut
public IProcessOutputStream getStandardOut(java.lang.String linePrefix)
Get the standard out as process output stream- Parameters:
linePrefix- the line prefix- Returns:
- the process output stream
-
getStandardOut
public IProcessOutputStream getStandardOut(java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)
Get the standard out as process output stream- Parameters:
linePrefix- the line prefixprocessStreamExceptionHandler- the process stream exception handler or null- Returns:
- the process output stream
-
getStandardErr
public IProcessOutputStream getStandardErr()
Get the standard out as process error stream- Returns:
- the process output stream
-
getStandardErr
public IProcessOutputStream getStandardErr(java.lang.String linePrefix)
Get the standard out as process error stream- Parameters:
linePrefix- the line prefix- Returns:
- the process output stream
-
getStandardErr
public IProcessOutputStream getStandardErr(java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)
Get the standard out as process error stream- Parameters:
linePrefix- the line prefixprocessStreamExceptionHandler- the process stream exception handler or null- Returns:
- the process output stream
-
getProcessOutputStream
public IProcessOutputStream getProcessOutputStream(java.io.OutputStream os)
Get a process output stream which is wrapped by aOutputStream.- Parameters:
os- the output stream to pass as process output stream- Returns:
- the process output stream
-
getProcessOutputStream
public IProcessOutputStream getProcessOutputStream(java.io.OutputStream os, java.lang.String linePrefix)
Get a process output stream which is wrapped by aOutputStream.- Parameters:
os- the output stream to pass as process output streamlinePrefix- the line prefix- Returns:
- the process output stream
-
getProcessOutputStream
public IProcessOutputStream getProcessOutputStream(java.io.OutputStream os, java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)
Get a process output stream which is wrapped by aOutputStream.- Parameters:
os- the output stream to pass as process output streamlinePrefix- the line prefixprocessStreamExceptionHandler- the process stream exception handler or null- Returns:
- the process output stream
-
getProcessBufferOutputStream
public ProcessBufferOutputStream getProcessBufferOutputStream()
Get a process output stream buffer- Returns:
- a process output stream buffer
-
getProcessBufferOutputStream
public ProcessBufferOutputStream getProcessBufferOutputStream(java.lang.String linePrefix)
Get a process output stream buffer- Parameters:
linePrefix- the line prefix- Returns:
- a process output stream buffer
-
getProcessBufferOutputStream
public ProcessBufferOutputStream getProcessBufferOutputStream(java.lang.String linePrefix, IProcessStreamExceptionHandler processStreamExceptionHandler)
Get a process output stream buffer- Parameters:
linePrefix- the line prefixprocessStreamExceptionHandler- the process stream exception handler or null- Returns:
- a process output stream buffer
-
getSlf4jProcessOutputStream
public IProcessOutputStream getSlf4jProcessOutputStream()
Get a process output stream buffer- Returns:
- a process output stream buffer
-
getStandardIn
public IProcessInputStream getStandardIn()
Get the standard in as process input stream- Returns:
- the process input stream
-
getEmptyStandardIn
public IProcessInputStream getEmptyStandardIn()
Get the standard in as process input stream- Returns:
- the process input stream
-
getStandardInFromBuffer
public IProcessInputStream getStandardInFromBuffer(java.lang.String buffer)
Get the standard in read from the buffer as process input stream- Parameters:
buffer- the buffer- Returns:
- the process input stream
-
getStandardInFromFile
public IProcessInputStream getStandardInFromFile(java.io.File file)
Get the standard in as process input stream- Parameters:
file- the file as input- Returns:
- the process input stream
-
getStandardOutProcessStreamExceptionHandler
public IProcessStreamExceptionHandler getStandardOutProcessStreamExceptionHandler()
Get the standard in as process input stream- Returns:
- the process input stream
-
getStandardErrProcessStreamExceptionHandler
public IProcessStreamExceptionHandler getStandardErrProcessStreamExceptionHandler()
Get the standard in as process input stream- Returns:
- the process input stream
-
getSlf4jProcessStreamExceptionHandler
public IProcessStreamExceptionHandler getSlf4jProcessStreamExceptionHandler()
Get the standard in as process input stream- Returns:
- the process input stream
-
-