io.github.linmoure.utils.CloseUtil Maven / Gradle / Ivy
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