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 *      http://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 * @version $Id: IOExceptionWithCause.java 1643107 2014-12-03 13:05:23Z sebb $
026 * @since 1.4
027 * @deprecated (since 2.5) use {@link IOException} instead
028 */
029@Deprecated
030public class IOExceptionWithCause extends IOException {
031
032    /**
033     * Defines the serial version UID.
034     */
035    private static final long serialVersionUID = 1L;
036
037    /**
038     * Constructs a new instance with the given message and cause.
039     * <p>
040     * As specified in {@link Throwable}, the message in the given <code>cause</code> is not used in this instance's
041     * message.
042     * </p>
043     * 
044     * @param message
045     *            the message (see {@link #getMessage()})
046     * @param cause
047     *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
048     */
049    public IOExceptionWithCause(final String message, final Throwable cause) {
050        super(message, cause);
051    }
052
053    /**
054     * Constructs a new instance with the given cause.
055     * <p>
056     * The message is set to <code>cause==null ? null : cause.toString()</code>, which by default contains the class
057     * and message of <code>cause</code>. This constructor is useful for call sites that just wrap another throwable.
058     * </p>
059     * 
060     * @param cause
061     *            the cause (see {@link #getCause()}). A {@code null} value is allowed.
062     */
063    public IOExceptionWithCause(final Throwable cause) {
064        super(cause);
065    }
066
067}