Methods Summary |
---|
public boolean | checkError()
return findStream().checkError();
|
public void | close()
findStream().close();
|
protected java.io.PrintStream | findStream()Find PrintStream to which the output must be written to.
PrintStream ps = (PrintStream) streams.get();
if (ps == null) {
ps = wrapped;
}
return ps;
|
public void | flush()
findStream().flush();
|
public java.io.PrintStream | getWrapped()
// --------------------------------------------------------- Public Methods
return wrapped;
|
public void | print(boolean b)
findStream().print(b);
|
public void | print(char c)
findStream().print(c);
|
public void | print(int i)
findStream().print(i);
|
public void | print(long l)
findStream().print(l);
|
public void | print(float f)
findStream().print(f);
|
public void | print(double d)
findStream().print(d);
|
public void | print(char[] s)
findStream().print(s);
|
public void | print(java.lang.String s)
findStream().print(s);
|
public void | print(java.lang.Object obj)
findStream().print(obj);
|
public void | println()
findStream().println();
|
public void | println(boolean x)
findStream().println(x);
|
public void | println(char x)
findStream().println(x);
|
public void | println(int x)
findStream().println(x);
|
public void | println(long x)
findStream().println(x);
|
public void | println(float x)
findStream().println(x);
|
public void | println(double x)
findStream().println(x);
|
public void | println(char[] x)
findStream().println(x);
|
public void | println(java.lang.String x)
findStream().println(x);
|
public void | println(java.lang.Object x)
findStream().println(x);
|
protected void | setError()
//findStream().setError();
|
public static void | setThread()Start capturing thread's output.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
data.set(baos);
streams.set(new PrintStream(baos));
|
public static java.lang.String | unsetThread()Stop capturing thread's output and return captured data as a String.
ByteArrayOutputStream baos =
(ByteArrayOutputStream) data.get();
if (baos == null) {
return null;
}
streams.set(null);
data.set(null);
return baos.toString();
|
public void | write(int b)
findStream().write(b);
|
public void | write(byte[] b)
findStream().write(b);
|
public void | write(byte[] buf, int off, int len)
findStream().write(buf, off, len);
|