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