ackage org.fh.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* 说明:java压缩成zip
* 作者:FH Admin
* from:fhadmin.cn
*/
public class FileZip {
/**
* @param inputFileName 你要压缩的文件夹(整个完整路径)
* @param zipFileName 压缩后的文件(整个完整路径)
* @throws Exception
*/
public static Boolean zip(String inputFileName, String zipFileName) throws Exception {
zip(zipFileName, new File(inputFileName));
return true;
}
private static void zip(String zipFileName, File inputFile) throws Exception {
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFileName));
zip(out, inputFile, "");
out.flush();
out.close();
}
private static void zip(ZipOutputStream out, File f, String base) throws Exception {
if (f.isDirectory()) {
File[] fl = f.listFiles();
out.putNextEntry(new ZipEntry(base + "/"));
base = base.length() == 0 ? "" : base + "/";
for (int i = 0; i < fl.length; i++) {
zip(out, fl[i], base + fl[i].getName());
}
} else {
out.putNextEntry(new ZipEntry(base));
FileInputStream in = new FileInputStream(f);
int b;
while ((b = in.read()) != -1) {
out.write(b);
}
in.close();
}
}
public static void main(String [] temp){
try {
zip("E:\\ftl","E:\\test.zip");//你要压缩的文件夹 和 压缩后的文件
}catch (Exception ex) {
ex.printStackTrace();
}
}
}
-----------------------------------------------------------------自定义表单
28. 定义模版:拖拽左侧表单元素到右侧区域,编辑表单元素,保存表单模版
29. 表单模版:编辑维护表单模版,复制表单模版,修改模版类型,预览表单模版
30. 我的表单:选择表单模版,编辑表单规则,是否上传图片、附件、开启富文本、挂靠流程开关等
31. 表单数据:从我的表单进去可增删改查表单数据,修改表单规则
32. 挂靠记录:记录表单数据和流程实例ID关联记录,可删除