1. import net.lingala.zip4j.ZipFile;
  2. import net.lingala.zip4j.exception.ZipException;
  3. import net.lingala.zip4j.model.ZipParameters;
  4. import java.io.File;
  5. import java.io.IOException;
  6. public class SampleClass{
  7. public static void main(String[] args)
  8. throws ZipException,
  9. IOException{
  10. ZipFile zip = null;
  11. try{
  12. zip = new ZipFile("myzip.zip");
  13. zip.createSplitZipFileFromFolder
  14. (new File("folder"),
  15. new ZipParameters(),
  16. true,
  17. 81920);
  18. }
  19. finally{
  20. if(zip != null)
  21. zip.close();
  22. }
  23. System.out.println
  24. ("main thread end");
  25. }
  26. }