Class ProcessBuilderCallable.ProcessWrapper
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.ProcessBuilderCallable.ProcessWrapper
-
- Enclosing class:
- ProcessBuilderCallable
public static final class ProcessBuilderCallable.ProcessWrapper extends Object
Note: this class is not thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
environmentAdd(Map<String,String> p_env)
List<String>
getCommand()
String
getCommandStr()
Map<String,String>
getEnvironment()
OutputStream
getErrorStream()
int
getExitCode()
InputStream
getInputStream()
String
getStdOut()
String
getStreamEncoding()
String
getWorkingDirectory()
boolean
isError()
boolean
isRedirectErrorStream()
boolean
isSuccess()
void
setEnvironment(Map<String,String> p_env)
void
setOutputStream(OutputStream p_out)
void
setOutputStream(Writer p_writer)
void
setRedirectErrorStream(boolean p_bRedirectErrorStream)
void
setStreamEncoding(String p_strStreamEncoding)
void
setWorkingDirectory(String p_strDir)
void
start()
void
startAndReadStdOut()
void
startAndWaitFor()
void
waitFor()
-
-
-
Method Detail
-
getCommandStr
public String getCommandStr()
-
getWorkingDirectory
public String getWorkingDirectory()
-
setWorkingDirectory
public void setWorkingDirectory(String p_strDir)
-
getExitCode
public int getExitCode()
-
isSuccess
public boolean isSuccess()
-
isError
public boolean isError()
-
getStreamEncoding
public String getStreamEncoding()
-
setStreamEncoding
public void setStreamEncoding(String p_strStreamEncoding)
-
isRedirectErrorStream
public boolean isRedirectErrorStream()
-
setRedirectErrorStream
public void setRedirectErrorStream(boolean p_bRedirectErrorStream)
-
getStdOut
public String getStdOut() throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getInputStream
public InputStream getInputStream()
- See Also:
Process.getInputStream()
-
getErrorStream
public OutputStream getErrorStream()
- See Also:
Process.getErrorStream()
-
setOutputStream
public void setOutputStream(OutputStream p_out)
-
setOutputStream
public void setOutputStream(Writer p_writer)
-
start
public void start() throws IOException
- Throws:
IOException
-
startAndReadStdOut
public void startAndReadStdOut() throws IOException
- Throws:
IOException
-
startAndWaitFor
public void startAndWaitFor() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
waitFor
public void waitFor() throws InterruptedException
- Throws:
InterruptedException
-
-