2019-04-09 12:54:43 +00:00
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
|
|
|
|
public class PipeIO implements AutoCloseable {
|
2019-04-11 16:30:25 +00:00
|
|
|
public PipeReader reader;
|
|
|
|
public PipeWriter writer;
|
2019-04-09 12:54:43 +00:00
|
|
|
|
2019-04-11 16:30:25 +00:00
|
|
|
public PipeIO(String in_pipe_path, String out_pipe_path) {
|
2019-04-09 12:54:43 +00:00
|
|
|
this.reader = new PipeReader(in_pipe_path);
|
|
|
|
this.writer = new PipeWriter(out_pipe_path);
|
|
|
|
}
|
|
|
|
|
2019-04-11 16:30:25 +00:00
|
|
|
public void close() {
|
2019-04-09 12:54:43 +00:00
|
|
|
this.reader.close();
|
|
|
|
this.writer.close();
|
|
|
|
}
|
|
|
|
}
|