    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      https://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017
    018package org.apache.commons.io;
    019
    020import java.io.IOException;
    021
    022/**
    023 * Subclasses IOException with the {@link Throwable} constructors missing before Java 6.
    024 *
    025 * @since 1.4
    026 * @deprecated (since 2.5) use {@link IOException} instead.
    027 */
    028@Deprecated
    029public class IOExceptionWithCause extends IOException {
    030
    031    /**
    032     * Defines the serial version UID.
    033     */
    034    private static final long serialVersionUID = 1L;
    035
    036    /**
    037     * Constructs a new instance with the given message and cause.
    038     * <p>
    039     * As specified in {@link Throwable}, the message in the given {@code cause} is not used in this instance's
    040     * message.
    041     * </p>
    042     *
    043     * @param message
    044     *            the message (see {@link #getMessage()}).
    045     * @param cause
    046     *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
    047     */
    048    public IOExceptionWithCause(final String message, final Throwable cause) {
    049        super(message, cause);
    050    }
    051
    052    /**
    053     * Constructs a new instance with the given cause.
    054     * <p>
    055     * The message is set to {@code cause==null ? null : cause.toString()}, which by default contains the class
    056     * and message of {@code cause}. This constructor is useful for call sites that just wrap another throwable.
    057     * </p>
    058     *
    059     * @param cause
    060     *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
    061     */
    062    public IOExceptionWithCause(final Throwable cause) {
    063        super(cause);
    064    }
    065
    066}