1 package org.simantics.export.core;
3 import java.io.FileInputStream;
4 import java.io.FileOutputStream;
5 import java.util.zip.ZipEntry;
6 import java.util.zip.ZipOutputStream;
8 import org.simantics.databoard.util.StreamUtil;
10 public class ZipTest {
12 public static void main(String[] args) throws Exception {
14 FileOutputStream fos = new FileOutputStream("C:/scratch/case1_h_example.zip");
15 ZipOutputStream zos = new ZipOutputStream(fos);
17 FileInputStream fis1 = new FileInputStream("C:/scratch/case1_h.pdf");
19 zos.putNextEntry(new ZipEntry("case1_h.pdf"));
20 StreamUtil.copyStream(fis1, zos);
26 FileInputStream fis2 = new FileInputStream("C:/scratch/VF62.aprosDiagram");
28 zos.putNextEntry(new ZipEntry("VF62.aprosDiagram"));
29 StreamUtil.copyStream(fis2, zos);