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.
Stack stack = (Stack)logs.get();
if (stack != null && !stack.isEmpty()) {
CaptureLog log = (CaptureLog)stack.peek();
if (log != null) {
PrintStream ps = log.getStream();
if (ps != null) {
return ps;
}
}
}
return out;
|
public void | flush()
findStream().flush();
|
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 | startCapture()Start capturing thread's output.
// --------------------------------------------------------- Public Methods
CaptureLog log = null;
if (!reuse.isEmpty()) {
try {
log = (CaptureLog)reuse.pop();
} catch (EmptyStackException e) {
log = new CaptureLog();
}
} else {
log = new CaptureLog();
}
Stack stack = (Stack)logs.get();
if (stack == null) {
stack = new Stack();
logs.set(stack);
}
stack.push(log);
|
public static java.lang.String | stopCapture()Stop capturing thread's output and return captured data as a String.
Stack stack = (Stack)logs.get();
if (stack == null || stack.isEmpty()) {
return null;
}
CaptureLog log = (CaptureLog)stack.pop();
if (log == null) {
return null;
}
String capture = log.getCapture();
log.reset();
reuse.push(log);
return capture;
|
public void | write(byte[] b)
findStream().write(b);
|
public void | write(byte[] buf, int off, int len)
findStream().write(buf, off, len);
|
public void | write(int b)
findStream().write(b);
|