writeFile

master
chengqf 2 years ago
parent 6cc3d6585d
commit 35d33b6870

@ -1,6 +1,7 @@
package com.glxp.api.idc.utils;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -163,4 +164,14 @@ public class IDCUtils {
return result;
}
public static void writeFile(byte[] file, String filePath, String fileName) throws Exception {
File targetFile = new File(filePath);
if (!targetFile.exists()) {
targetFile.mkdirs();
}
FileOutputStream out = new FileOutputStream(filePath + fileName);
out.write(file);
out.flush();
out.close();
}
}

Loading…
Cancel
Save