Zip4j supports creating a split zip file. Here's a sample for creating a split zip file (example from the Zip4j sample package )
ZipFile.createZipFile(File sourceFile, ZipParameters parameters, boolean splitArchive, long splitLength)
is a method of creating a split zip file. boolean splitArchive should be set to true in this case. You can set the maximum file size for each split file (z01, z02, etc.) using long splitLength
import java.io.File; import java.util.ArrayList; import net.lingala.zip4j.core.ZipFile; import net.lingala.zip4j.exception.ZipException; import net.lingala.zip4j.model.ZipParameters; import net.lingala.zip4j.util.Zip4jConstants; public class CreateSplitZipFile { public CreateSplitZipFile() { try {
source share