1,实现效果
*
关闭流
package com.sjws.utils;
import java.io.Closeable;
import java.io.IOException;
public class StreamUtils {
/**
* 关闭流
* @param stream
*/
public static void close(Closeable stream) {
if(stream!=null){
try {
stream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}