KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > io > InterruptedIOException


1 /*
2  * @(#)InterruptedIOException.java 1.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.io;
9
10 /**
11  * Signals that an I/O operation has been interrupted. An
12  * <code>InterruptedIOException</code> is thrown to indicate that an
13  * input or output transfer has been terminated because the thread
14  * performing it was interrupted. The field {@link #bytesTransferred}
15  * indicates how many bytes were successfully transferred before
16  * the interruption occurred.
17  *
18  * @author unascribed
19  * @version 1.19, 12/19/03
20  * @see java.io.InputStream
21  * @see java.io.OutputStream
22  * @see java.lang.Thread#interrupt()
23  * @since JDK1.0
24  */

25 public
26 class InterruptedIOException extends IOException JavaDoc {
27     /**
28      * Constructs an <code>InterruptedIOException</code> with
29      * <code>null</code> as its error detail message.
30      */

31     public InterruptedIOException() {
32     super();
33     }
34
35     /**
36      * Constructs an <code>InterruptedIOException</code> with the
37      * specified detail message. The string <code>s</code> can be
38      * retrieved later by the
39      * <code>{@link java.lang.Throwable#getMessage}</code>
40      * method of class <code>java.lang.Throwable</code>.
41      *
42      * @param s the detail message.
43      */

44     public InterruptedIOException(String JavaDoc s) {
45     super(s);
46     }
47
48     /**
49      * Reports how many bytes had been transferred as part of the I/O
50      * operation before it was interrupted.
51      *
52      * @serial
53      */

54     public int bytesTransferred = 0;
55 }
56
Popular Tags