|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
groovy.ui.SystemOutputInterceptor
public class SystemOutputInterceptor
Intercepts System.out. Implementation helper for Console.groovy.
Field Summary |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
SystemOutputInterceptor(Closure callback)
Constructor |
Method Summary | |
---|---|
void |
start()
Starts intercepting System.out |
void |
stop()
Stops intercepting System.out, sending output to whereever it was going when this interceptor was created. |
void |
write(byte[] b,
int off,
int len)
Intercepts output - moret common case of byte[] |
void |
write(int b)
Intercepts output - single characters |
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemOutputInterceptor(Closure callback)
callback
- accepts a string to be sent to std out and returns a Boolean.
If the return value is true, output will be sent to
System.out, otherwise it will not.Method Detail |
---|
public void start()
public void stop()
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |