|
|
@@ -2914,7 +2914,20 @@ public class FileUtil extends PathUtil {
|
|
|
* @throws IORuntimeException IO异常
|
|
|
*/
|
|
|
public static File writeFromStream(InputStream in, File dest) throws IORuntimeException {
|
|
|
- return FileWriter.create(dest).writeFromStream(in);
|
|
|
+ return writeFromStream(in, dest, true);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将流的内容写入文件
|
|
|
+ *
|
|
|
+ * @param dest 目标文件
|
|
|
+ * @param in 输入流
|
|
|
+ * @return dest
|
|
|
+ * @throws IORuntimeException IO异常
|
|
|
+ * @since 5.5.6
|
|
|
+ */
|
|
|
+ public static File writeFromStream(InputStream in, File dest, boolean isCloseIn) throws IORuntimeException {
|
|
|
+ return FileWriter.create(dest).writeFromStream(in, isCloseIn);
|
|
|
}
|
|
|
|
|
|
/**
|