1 /* 2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package javax.imageio; 27 28 import java.io.IOException; 29 30 /** 31 * An exception class used for signaling run-time failure of reading 32 * and writing operations. 33 * 34 * <p> In addition to a message string, a reference to another 35 * {@code Throwable} ({@code Error} or 36 * {@code Exception}) is maintained. This reference, if 37 * non-{@code null}, refers to the event that caused this 38 * exception to occur. For example, an {@code IOException} while 39 * reading from a {@code File} would be stored there. 40 * 41 */ 42 public class IIOException extends IOException { 43 private static final long serialVersionUID = -3216210718638985251L; 44 45 /** 46 * Constructs an {@code IIOException} with a given message 47 * {@code String}. No underlying cause is set; 48 * {@code getCause} will return {@code null}. 49 * 50 * @param message the error message. 51 * 52 * @see #getMessage 53 */ 54 public IIOException(String message) { 55 super(message); 56 } 57 58 /** 59 * Constructs an {@code IIOException} with a given message 60 * {@code String} and a {@code Throwable} that was its 61 * underlying cause. 62 * 63 * @param message the error message. 64 * @param cause the {@code Throwable} ({@code Error} or 65 * {@code Exception}) that caused this exception to occur. 66 * 67 * @see #getCause 68 * @see #getMessage 69 */ 70 public IIOException(String message, Throwable cause) { 71 super(message); 72 initCause(cause); 73 } 74 } --- EOF ---