01: package org.romaframework.core.command;
02:
03: import java.io.InputStream;
04: import java.io.PrintStream;
05:
06: public class CommandIO {
07:
08: private InputStream input;
09: private PrintStream output;
10: private PrintStream error;
11:
12: public CommandIO() {
13: this .input = System.in;
14: this .output = System.out;
15: this .error = System.err;
16: }
17:
18: public CommandIO(InputStream input, PrintStream output,
19: PrintStream error) {
20: this .input = input;
21: this .output = output;
22: this .error = error;
23: }
24:
25: public PrintStream getError() {
26: return error;
27: }
28:
29: public void setError(PrintStream iStream) {
30: error = iStream;
31: }
32:
33: public PrintStream getOutput() {
34: return output;
35: }
36:
37: public void setOutput(PrintStream iStream) {
38: output = iStream;
39: }
40:
41: public InputStream getInput() {
42: return input;
43: }
44:
45: public void setInput(InputStream input) {
46: this.input = input;
47: }
48: }
|