package com.zzg.common.utils; import java.io.Closeable; import java.io.IOException; /** * @description: IO流关闭工具Utils */ public class IOCloseUtil { /** * IO流关闭工具类 */ public static void close(Closeable... io) { for (Closeable temp : io) { try { if (null != temp) temp.close(); } catch (IOException e) { System.out.println("" + e.getMessage()); } } } public static void closeAll(T... io) { for (Closeable temp : io) { try { if (null != temp) temp.close(); } catch (IOException e) { System.out.println("" + e.getMessage()); } } } }