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

com.github.fashionbrot.tool.IOUtil Maven / Gradle / Ivy

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) {
            }
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy