rt/emul/mini/src/main/java/java/io/IOException.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772 d382dacfd73f
parent 554 emul/mini/src/main/java/java/io/IOException.java@05224402145d
permissions -rw-r--r--
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
jaroslav@56
     1
/*
jaroslav@56
     2
 * Copyright (c) 1994, 2006, Oracle and/or its affiliates. All rights reserved.
jaroslav@56
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jaroslav@56
     4
 *
jaroslav@56
     5
 * This code is free software; you can redistribute it and/or modify it
jaroslav@56
     6
 * under the terms of the GNU General Public License version 2 only, as
jaroslav@56
     7
 * published by the Free Software Foundation.  Oracle designates this
jaroslav@56
     8
 * particular file as subject to the "Classpath" exception as provided
jaroslav@56
     9
 * by Oracle in the LICENSE file that accompanied this code.
jaroslav@56
    10
 *
jaroslav@56
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jaroslav@56
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jaroslav@56
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jaroslav@56
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jaroslav@56
    15
 * accompanied this code).
jaroslav@56
    16
 *
jaroslav@56
    17
 * You should have received a copy of the GNU General Public License version
jaroslav@56
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jaroslav@56
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jaroslav@56
    20
 *
jaroslav@56
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jaroslav@56
    22
 * or visit www.oracle.com if you need additional information or have any
jaroslav@56
    23
 * questions.
jaroslav@56
    24
 */
jaroslav@56
    25
jaroslav@56
    26
package java.io;
jaroslav@56
    27
jaroslav@56
    28
/**
jaroslav@56
    29
 * Signals that an I/O exception of some sort has occurred. This
jaroslav@56
    30
 * class is the general class of exceptions produced by failed or
jaroslav@56
    31
 * interrupted I/O operations.
jaroslav@56
    32
 *
jaroslav@56
    33
 * @author  unascribed
jaroslav@56
    34
 * @see     java.io.InputStream
jaroslav@56
    35
 * @see     java.io.OutputStream
jaroslav@56
    36
 * @since   JDK1.0
jaroslav@56
    37
 */
jaroslav@56
    38
public
jaroslav@56
    39
class IOException extends Exception {
jaroslav@56
    40
    static final long serialVersionUID = 7818375828146090155L;
jaroslav@56
    41
jaroslav@56
    42
    /**
jaroslav@56
    43
     * Constructs an {@code IOException} with {@code null}
jaroslav@56
    44
     * as its error detail message.
jaroslav@56
    45
     */
jaroslav@56
    46
    public IOException() {
jaroslav@56
    47
        super();
jaroslav@56
    48
    }
jaroslav@56
    49
jaroslav@56
    50
    /**
jaroslav@56
    51
     * Constructs an {@code IOException} with the specified detail message.
jaroslav@56
    52
     *
jaroslav@56
    53
     * @param message
jaroslav@56
    54
     *        The detail message (which is saved for later retrieval
jaroslav@56
    55
     *        by the {@link #getMessage()} method)
jaroslav@56
    56
     */
jaroslav@56
    57
    public IOException(String message) {
jaroslav@56
    58
        super(message);
jaroslav@56
    59
    }
jaroslav@56
    60
jaroslav@56
    61
    /**
jaroslav@56
    62
     * Constructs an {@code IOException} with the specified detail message
jaroslav@56
    63
     * and cause.
jaroslav@56
    64
     *
jaroslav@56
    65
     * <p> Note that the detail message associated with {@code cause} is
jaroslav@56
    66
     * <i>not</i> automatically incorporated into this exception's detail
jaroslav@56
    67
     * message.
jaroslav@56
    68
     *
jaroslav@56
    69
     * @param message
jaroslav@56
    70
     *        The detail message (which is saved for later retrieval
jaroslav@56
    71
     *        by the {@link #getMessage()} method)
jaroslav@56
    72
     *
jaroslav@56
    73
     * @param cause
jaroslav@56
    74
     *        The cause (which is saved for later retrieval by the
jaroslav@56
    75
     *        {@link #getCause()} method).  (A null value is permitted,
jaroslav@56
    76
     *        and indicates that the cause is nonexistent or unknown.)
jaroslav@56
    77
     *
jaroslav@56
    78
     * @since 1.6
jaroslav@56
    79
     */
jaroslav@56
    80
    public IOException(String message, Throwable cause) {
jaroslav@56
    81
        super(message, cause);
jaroslav@56
    82
    }
jaroslav@56
    83
jaroslav@56
    84
    /**
jaroslav@56
    85
     * Constructs an {@code IOException} with the specified cause and a
jaroslav@56
    86
     * detail message of {@code (cause==null ? null : cause.toString())}
jaroslav@56
    87
     * (which typically contains the class and detail message of {@code cause}).
jaroslav@56
    88
     * This constructor is useful for IO exceptions that are little more
jaroslav@56
    89
     * than wrappers for other throwables.
jaroslav@56
    90
     *
jaroslav@56
    91
     * @param cause
jaroslav@56
    92
     *        The cause (which is saved for later retrieval by the
jaroslav@56
    93
     *        {@link #getCause()} method).  (A null value is permitted,
jaroslav@56
    94
     *        and indicates that the cause is nonexistent or unknown.)
jaroslav@56
    95
     *
jaroslav@56
    96
     * @since 1.6
jaroslav@56
    97
     */
jaroslav@56
    98
    public IOException(Throwable cause) {
jaroslav@56
    99
        super(cause);
jaroslav@56
   100
    }
jaroslav@56
   101
}