1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| package db.util;
|
| import java.io.InputStream;
| import java.io.OutputStream;
|
| public class IOUtil {
|
| /**
| * <p>Description: 关闭输入流 </p>
| * @param is inputStream
| */
| public static void closeQuietly(InputStream is) {
| if (is == null) {
| return;
| }
|
| try {
| is.close();
| } catch (Throwable e) {
| // do nothing
| }
| }
|
| /**
| * <p>Description: 关闭输出流 </p>
| * @param os outputStream
| */
| public static void closeQuietly(OutputStream os) {
| if (os == null) {
| return;
| }
|
| try {
| os.close();
| } catch (Throwable e) {
| // do nothing
| }
| }
|
| }
|
|