General J2EE: Multipart / split Java Zip / upzip issue

  1. Multipart / split Java Zip / upzip issue (2 messages)

    I am looking this particular problem for couple of days.May be someone had this issue before and resolved it already - pls help.

    Using java.lang.zip.* I have tried to zip/unzip normal zip/jar files with out any issue. No big deal .. ll good.

    But, couldnt read or archive a zipfile with split / multipart file. I have used winzip to create a zip file with 5m max file size. so the file created are like a.zip, a.z01, a,z02 ....
    I have tried many option and many libraries to read and extract the contents programically.

    Just wondering anyone had similar problem and found a solution? I am more than happy to use any libraries as long as it could handle multipart zip and unzip.

    Any help would be great.

  2. update - i have now used truezip and please see the example code used below. But couldn't process the one created. CheckedInputStream used as a trial but doesnt really matter.

    de.schlichtherle.io.File file = new de.schlichtherle.io.File(

    file.archiveCopyAllTo(new de.schlichtherle.io.File(
            "d:/test/out-tzip.zip", ArchiveDetector.ALL));

    byte[] buf = new byte[2048];
    ZipEntry zipentry;

    final File file1 = new File("d:/test/out-tzip.zip");

    FileInputStream fis = new FileInputStream(file1);

    InputStream checksum = new CheckedInputStream(fis, new CRC32());
    ZipInputStream zipinputstream = new ZipInputStream(checksum);

    zipentry = zipinputstream.getNextEntry();

  3. net.lingala.zip4j.examples.zip.CreateSplitZipFile appears to be your solution