| java.io.PrintStream org.tanukisoftware.wrapper.test.DeadlockPrintStream
DeadlockPrintStream | public class DeadlockPrintStream extends PrintStream (Code) | | A print stream which can be put into a state in which all calls to write
to it will result in the calling threads deadlocking in the call.
Obviously, this class will not be useful to many as it is for tests.
author: Leif Mortenson |
Method Summary | |
public void | close() | public void | flush() | public void | setDeadlock(boolean deadlock) Sets or clears the deadlock flag. | public void | write(int b) | public void | write(byte[] b) | public void | write(byte[] b, int off, int len) |
DeadlockPrintStream | public DeadlockPrintStream(PrintStream out)(Code) | | Creates a new DeadlockPrintStream wrapped around another PrintStream.
Parameters: out - The PrintStream which will be wrapped by this new stream. |
close | public void close()(Code) | | |
flush | public void flush()(Code) | | |
setDeadlock | public void setDeadlock(boolean deadlock)(Code) | | Sets or clears the deadlock flag. If set, calls to any other method
of this class will result in the calling thread being deadlocked.
They will be released if the flag is cleared with this method.
Parameters: deadlock - True to set the flag, false to clear it. |
write | public void write(int b)(Code) | | |
write | public void write(byte[] b, int off, int len)(Code) | | |
Methods inherited from java.io.PrintStream | public PrintStream append(CharSequence csq)(Code)(Java Doc) public PrintStream append(CharSequence csq, int start, int end)(Code)(Java Doc) public PrintStream append(char c)(Code)(Java Doc) public boolean checkError()(Code)(Java Doc) protected void clearError()(Code)(Java Doc) public void close()(Code)(Java Doc) public void flush()(Code)(Java Doc) public PrintStream format(String format, Object... args)(Code)(Java Doc) public PrintStream format(Locale l, String format, Object... args)(Code)(Java Doc) public void print(boolean b)(Code)(Java Doc) public void print(char c)(Code)(Java Doc) public void print(int i)(Code)(Java Doc) public void print(long l)(Code)(Java Doc) public void print(float f)(Code)(Java Doc) public void print(double d)(Code)(Java Doc) public void print(char s)(Code)(Java Doc) public void print(String s)(Code)(Java Doc) public void print(Object obj)(Code)(Java Doc) public PrintStream printf(String format, Object... args)(Code)(Java Doc) public PrintStream printf(Locale l, String format, Object... args)(Code)(Java Doc) public void println()(Code)(Java Doc) public void println(boolean x)(Code)(Java Doc) public void println(char x)(Code)(Java Doc) public void println(int x)(Code)(Java Doc) public void println(long x)(Code)(Java Doc) public void println(float x)(Code)(Java Doc) public void println(double x)(Code)(Java Doc) public void println(char x)(Code)(Java Doc) public void println(String x)(Code)(Java Doc) public void println(Object x)(Code)(Java Doc) protected void setError()(Code)(Java Doc) public void write(int b)(Code)(Java Doc) public void write(byte buf, int off, int len)(Code)(Java Doc)
|
|
|