com.github.fashionbrot.tool.IOUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mars-tool Show documentation
Show all versions of mars-tool Show documentation
mars-tool 工具包 https://github.com/fashionbrot/mars-tool
The newest version!
package com.github.fashionbrot.tool;
public class IOUtil {
/**
* close Closeable
* @param closeables the closeables
*/
public static void close(AutoCloseable... closeables) {
if (ObjectUtil.isNotEmpty(closeables)) {
for (AutoCloseable closeable : closeables) {
close(closeable);
}
}
}
/**
* close Closeable
* @param closeable the closeable
*/
public static void close(AutoCloseable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (Exception ignore) {
}
}
}
}