package com.convenient.android.common.utils.file

import java.io.Closeable

/**
 * @classname CloseUtils
 * @author LiuXiaoLong
 * @date 2022-07-19
 * @description 关闭流工具类
 */
object CloseUtils {

    /**
     * 关闭 IO
     * @param closeables closeables
     */
    @JvmStatic
    fun closeIO(vararg closeables: Closeable?) {
        if (closeables.isNullOrEmpty()) {
            return
        }
        try {
            for (closeable in closeables) {
                closeable?.close()
            }
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }


}