KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > util > IOExceptionWrapper


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2000,2006 Oracle. All rights reserved.
5  *
6  * $Id: IOExceptionWrapper.java,v 1.15 2006/10/30 21:14:34 bostic Exp $
7  */

8
9 package com.sleepycat.util;
10
11 import java.io.IOException JavaDoc;
12
13 /**
14  * An IOException that can contain nested exceptions.
15  *
16  * @author Mark Hayes
17  */

18 public class IOExceptionWrapper
19     extends IOException JavaDoc implements ExceptionWrapper {
20
21     private Throwable JavaDoc e;
22
23     public IOExceptionWrapper(Throwable JavaDoc e) {
24
25         super(e.getMessage());
26         this.e = e;
27     }
28
29     /**
30      * @deprecated replaced by {@link #getCause}.
31      */

32     public Throwable JavaDoc getDetail() {
33
34         return e;
35     }
36
37     public Throwable JavaDoc getCause() {
38
39         return e;
40     }
41 }
42
Popular Tags