KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > archive > io > RecoverableIOException


1 /* $Id: RecoverableIOException.java,v 1.1 2006/08/23 18:39:36 stack-sf Exp $
2  *
3  * Created on August 21st, 2006
4  *
5  * Copyright (C) 2006 Internet Archive.
6  *
7  * This file is part of the Heritrix web crawler (crawler.archive.org).
8  *
9  * Heritrix is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * any later version.
13  *
14  * Heritrix is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser Public License
20  * along with Heritrix; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */

23 package org.archive.io;
24
25 import java.io.IOException JavaDoc;
26 import java.io.PrintStream JavaDoc;
27 import java.io.PrintWriter JavaDoc;
28
29 /**
30  * A decorator on IOException for IOEs that are likely not fatal or at least
31  * merit retry.
32  * @author stack
33  * @version $Date: 2006/08/23 18:39:36 $, $Revision: 1.1 $
34  */

35 public class RecoverableIOException extends IOException JavaDoc {
36     private static final long serialVersionUID = 6194776587381865451L;
37     private final IOException JavaDoc decoratedIOException;
38
39     public RecoverableIOException(final String JavaDoc message) {
40         this(new IOException JavaDoc(message));
41     }
42
43     public RecoverableIOException(final IOException JavaDoc ioe) {
44         super();
45         this.decoratedIOException = ioe;
46     }
47
48     public Throwable JavaDoc getCause() {
49         return this.decoratedIOException.getCause();
50     }
51
52     public String JavaDoc getLocalizedMessage() {
53         return this.decoratedIOException.getLocalizedMessage();
54     }
55
56     public String JavaDoc getMessage() {
57         return this.decoratedIOException.getMessage();
58     }
59
60     public StackTraceElement JavaDoc[] getStackTrace() {
61         return this.decoratedIOException.getStackTrace();
62     }
63
64     public synchronized Throwable JavaDoc initCause(Throwable JavaDoc cause) {
65         return this.decoratedIOException.initCause(cause);
66     }
67
68     public void printStackTrace() {
69         this.decoratedIOException.printStackTrace();
70     }
71
72     public void printStackTrace(PrintStream JavaDoc s) {
73         this.decoratedIOException.printStackTrace(s);
74     }
75
76     public void printStackTrace(PrintWriter JavaDoc s) {
77         this.decoratedIOException.printStackTrace(s);
78     }
79
80     public void setStackTrace(StackTraceElement JavaDoc[] stackTrace) {
81         this.decoratedIOException.setStackTrace(stackTrace);
82     }
83
84     public String JavaDoc toString() {
85         return this.decoratedIOException.toString();
86     }
87 }
Popular Tags