1 *java.lang.InterruptedException* *InterruptedException* Thrown when a thread is
3 public class InterruptedException
4 extends |java.lang.Exception|
6 |java.lang.InterruptedException_Description|
7 |java.lang.InterruptedException_Fields|
8 |java.lang.InterruptedException_Constructors|
9 |java.lang.InterruptedException_Methods|
11 ================================================================================
13 *java.lang.InterruptedException_Constructors*
14 |java.lang.InterruptedException()|Constructs an InterruptedException with no de
15 |java.lang.InterruptedException(String)|Constructs an InterruptedException with
17 *java.lang.InterruptedException_Description*
19 Thrown when a thread is waiting, sleeping, or otherwise occupied, and the
20 thread is interrupted, either before or during the activity. Occasionally a
21 method may wish to test whether the current thread has been interrupted, and if
22 so, to immediately throw this exception. The following code can be used to
25 if (Thread.interrupted()) // Clears interrupted status! throw new
26 InterruptedException();
30 *java.lang.InterruptedException()*
32 public InterruptedException()
34 Constructs an InterruptedException with no detail message.
37 *java.lang.InterruptedException(String)*
39 public InterruptedException(java.lang.String s)
41 Constructs an InterruptedException with the specified detail message.
43 s - the detail message.