KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > content > LowLevelIOException


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.content;
12
13 import java.io.IOException JavaDoc;
14 import org.eclipse.core.runtime.Assert;
15
16 /**
17  * A wrapper for IOExceptions, throw by LazyInputStream/Reader.
18  * Its purpose is to allow one to differentiate
19  * between IOExceptions thrown by the base stream/reader from those
20  * thrown by streams/readers built on top of LazyInputStream/Reader.
21  *
22  * @see LazyInputStream
23  * @see LazyReader
24  */

25 /* package */class LowLevelIOException extends IOException JavaDoc {
26
27     /**
28      * All serializable objects should have a stable serialVersionUID
29      */

30     private static final long serialVersionUID = 1L;
31
32     private IOException JavaDoc actual;
33
34     public LowLevelIOException(IOException JavaDoc actual) {
35         // ensure we don't wrap more than once
36
Assert.isLegal(!(actual instanceof LowLevelIOException));
37         this.actual = actual;
38     }
39
40     public IOException JavaDoc getActualException() {
41         return actual;
42     }
43 }
44
Popular Tags