5 public class Console implements bsh.ConsoleInterface {
6 ByteArrayOutputStream obuf = new ByteArrayOutputStream();
7 ByteArrayOutputStream ebuf = new ByteArrayOutputStream();
8 Reader in = new StringReader("");
13 out = new PrintStream(obuf, false, "UTF-8");
14 err = new PrintStream(ebuf, false, "UTF-8");
15 } catch(UnsupportedEncodingException e) {
20 public void error(Object msg) {
21 getErr().println(msg);
24 public void print(Object o) {
28 public void println(Object o) {
32 public PrintStream getOut() {
36 public PrintStream getErr() {
40 public Reader getIn() {