General J2EE: Multipart / split Java Zip / upzip issue
I am looking this particular problem for couple of days.May be someone had this issue before and resolved it already - pls help.
- Posted by: Arun Nair
- Posted on: March 15 2010 10:22 EDT
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.
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(
byte buf = new byte;
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();
net.lingala.zip4j.examples.zip.CreateSplitZipFile appears to be your solution