com.jn.langx.commandline.ProcessAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of langx-java Show documentation
Show all versions of langx-java Show documentation
Java lang extensions for java6+, a supplement to , replacement of a Guava, commons-lang.
Core utilities, Collection utilities, IO utilities, Cache, Configuration library ...
package com.jn.langx.commandline;
import java.io.InputStream;
import java.io.OutputStream;
public class ProcessAdapter implements InstructionSequence {
private Process process;
public ProcessAdapter(Process process) {
this.process = process;
}
@Override
public OutputStream getOutputStream() {
return process.getOutputStream();
}
@Override
public InputStream getInputStream() {
return process.getInputStream();
}
@Override
public InputStream getErrorStream() {
return process.getErrorStream();
}
public void destroy() {
process.destroy();
}
@Override
public int waitFor()throws InterruptedException {
return process.waitFor();
}
@Override
public int exitValue() {
return process.exitValue();
}
}