aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/utils/IOUtils.java
blob: 73db12ff38c910e7273cd458b58066adb065fd7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package cgeo.geocaching.utils;

import java.io.Closeable;
import java.io.IOException;

final public class IOUtils {

    private IOUtils() {}

    public static void closeQuietly(final Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (final IOException e) {
                Log.w("closeQuietly: unable to close " + closeable, e);
            }
        }
    }

}