import java.io.Closeable; import java.io.IOException; public class IOUtils { public static void close(Closeable ...io){ for (Closeable closeable : io) { if(closeable!=null){ try { closeable.close(); } catch (IOException e) { e.printStackTrace(); } } } } }
原文地址:https://www.cnblogs.com/qurui1997/p/10609839.html
时间: 2024-10-10 04:48:18