• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *******************************************************************************
3  * Copyright (C) 2014-2015, International Business Machines Corporation and
4  * others. All Rights Reserved.
5  *******************************************************************************
6  */
7 package com.ibm.icu.util;
8 
9 /**
10  * Unchecked version of {@link java.io.IOException}.
11  * Some ICU APIs do not throw the standard exception but instead wrap it
12  * into this unchecked version.
13  *
14  * <p>This currently extends {@link RuntimeException},
15  * but when ICU can rely on Java 8 this class should be changed to extend
16  * java.io.UncheckedIOException instead.
17  *
18  * @stable ICU 53
19  */
20 public class ICUUncheckedIOException extends RuntimeException {
21     private static final long serialVersionUID = 1210263498513384449L;
22 
23     /**
24      * Default constructor.
25      *
26      * @stable ICU 53
27      */
ICUUncheckedIOException()28     public ICUUncheckedIOException() {
29     }
30 
31     /**
32      * Constructor.
33      *
34      * @param message exception message string
35      * @stable ICU 53
36      */
ICUUncheckedIOException(String message)37     public ICUUncheckedIOException(String message) {
38         super(message);
39     }
40 
41     /**
42      * Constructor.
43      *
44      * @param cause original exception (normally a {@link java.io.IOException})
45      * @stable ICU 53
46      */
ICUUncheckedIOException(Throwable cause)47     public ICUUncheckedIOException(Throwable cause) {
48         super(cause);
49     }
50 
51     /**
52      * Constructor.
53      *
54      * @param message exception message string
55      * @param cause original exception (normally a {@link java.io.IOException})
56      * @stable ICU 53
57      */
ICUUncheckedIOException(String message, Throwable cause)58     public ICUUncheckedIOException(String message, Throwable cause) {
59         super(message, cause);
60     }
61 }
62