|
@@ -8,7 +8,6 @@ import cn.hutool.http.HttpUtil;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import it.sauronsoftware.jave.*;
|
|
import it.sauronsoftware.jave.*;
|
|
-import org.apache.tools.zip.ZipOutputStream;
|
|
|
|
import org.bytedeco.javacpp.opencv_core;
|
|
import org.bytedeco.javacpp.opencv_core;
|
|
import org.bytedeco.javacv.FFmpegFrameGrabber;
|
|
import org.bytedeco.javacv.FFmpegFrameGrabber;
|
|
import org.bytedeco.javacv.Frame;
|
|
import org.bytedeco.javacv.Frame;
|
|
@@ -309,35 +308,6 @@ public class FileUtils {
|
|
ZipUtil.zip(inputFileName,zipFileName);
|
|
ZipUtil.zip(inputFileName,zipFileName);
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- * 能支持中文的压缩 参数base 开始为"" first 开始为true
|
|
|
|
- */
|
|
|
|
- public static void zipIt(ZipOutputStream out, File f,String base, boolean first) throws Exception {
|
|
|
|
- if (f.isDirectory()) {
|
|
|
|
- File[] fl = f.listFiles();
|
|
|
|
- if (first) {
|
|
|
|
- first = false;
|
|
|
|
- } else {
|
|
|
|
- base = base + "/";
|
|
|
|
- }
|
|
|
|
- for (int i = 0; i < fl.length; i++) {
|
|
|
|
- zipIt(out, fl[i], base + fl[i].getName(), first);
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (first) {
|
|
|
|
- base = f.getName();
|
|
|
|
- }
|
|
|
|
- out.putNextEntry(new org.apache.tools.zip.ZipEntry(base));
|
|
|
|
- FileInputStream in = new FileInputStream(f);
|
|
|
|
- int b;
|
|
|
|
- while ((b = in.read()) != -1) {
|
|
|
|
- out.write(b);
|
|
|
|
- }
|
|
|
|
- in.close();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//删除文件夹
|
|
//删除文件夹
|
|
public static void delFolder(String folderPath) {
|
|
public static void delFolder(String folderPath) {
|
|
FileUtil.del(folderPath);
|
|
FileUtil.del(folderPath);
|