KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > imageio > IIOException


1 /*
2  * @(#)IIOException.java 1.16 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 javax.imageio;
9
10 import java.io.IOException JavaDoc;
11
12 /**
13  * An exception class used for signaling run-time failure of reading
14  * and writing operations.
15  *
16  * <p> In addition to a message string, a reference to another
17  * <code>Throwable</code> (<code>Error</code> or
18  * <code>Exception</code>) is maintained. This reference, if
19  * non-<code>null</code>, refers to the event that caused this
20  * exception to occur. For example, an <code>IOException</code> while
21  * reading from a <code>File</code> would be stored there.
22  *
23  * @version 0.5
24  */

25 public class IIOException extends IOException JavaDoc {
26
27     /**
28      * Constructs an <code>IIOException</code> with a given message
29      * <code>String</code>. No underlying cause is set;
30      * <code>getCause</code> will return <code>null</code>.
31      *
32      * @param message the error message.
33      *
34      * @see #getMessage
35      */

36     public IIOException(String JavaDoc message) {
37         super(message);
38     }
39
40     /**
41      * Constructs an <code>IIOException</code> with a given message
42      * <code>String</code> and a <code>Throwable</code> that was its
43      * underlying cause.
44      *
45      * @param message the error message.
46      * @param cause the <code>Throwable</code> (<code>Error</code> or
47      * <code>Exception</code>) that caused this exception to occur.
48      *
49      * @see #getCause
50      * @see #getMessage
51      */

52     public IIOException(String JavaDoc message, Throwable JavaDoc cause) {
53         super(message);
54         initCause(cause);
55     }
56 }
57
Popular Tags