All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.linmoure.utils.CloseUtil Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package io.github.linmoure.utils;

import java.io.Closeable;

public class CloseUtil {

    public static void close(Closeable closeable) {
        if (null != closeable) {
            try {
                closeable.close();
            } catch (Exception e) {
                // 静默关闭
            }
        }
    }

    public static void close(AutoCloseable closeable) {
        if (null != closeable) {
            try {
                closeable.close();
            } catch (Exception e) {
                // 静默关闭
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy