All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jn.langx.commandline.ProcessAdapter Maven / Gradle / Ivy

Go to download

Java lang extensions for java6+, a supplement to , replacement of a Guava, commons-lang. Core utilities, Collection utilities, IO utilities, Cache, Configuration library ...

There is a newer version: 4.8.2
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy