Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.desktop/share/classes/javax/imageio/IIOException.java
41152 views
1
/*
2
* Copyright (c) 2000, 2021, 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
import java.io.Serial;
30
31
/**
32
* An exception class used for signaling run-time failure of reading
33
* and writing operations.
34
*
35
* <p> In addition to a message string, a reference to another
36
* {@code Throwable} ({@code Error} or
37
* {@code Exception}) is maintained. This reference, if
38
* non-{@code null}, refers to the event that caused this
39
* exception to occur. For example, an {@code IOException} while
40
* reading from a {@code File} would be stored there.
41
*
42
*/
43
public class IIOException extends IOException {
44
45
/**
46
* Use serialVersionUID from JDK 9 for interoperability.
47
*/
48
@Serial
49
private static final long serialVersionUID = -3216210718638985251L;
50
51
/**
52
* Constructs an {@code IIOException} with a given message
53
* {@code String}. No underlying cause is set;
54
* {@code getCause} will return {@code null}.
55
*
56
* @param message the error message.
57
*
58
* @see #getMessage
59
*/
60
public IIOException(String message) {
61
super(message);
62
}
63
64
/**
65
* Constructs an {@code IIOException} with a given message
66
* {@code String} and a {@code Throwable} that was its
67
* underlying cause.
68
*
69
* @param message the error message.
70
* @param cause the {@code Throwable} ({@code Error} or
71
* {@code Exception}) that caused this exception to occur.
72
*
73
* @see #getCause
74
* @see #getMessage
75
*/
76
public IIOException(String message, Throwable cause) {
77
super(message);
78
initCause(cause);
79
}
80
}
81
82