Back to project page magdaa-library.
The source code is released under:
GNU General Public License
If you think the Android project magdaa-library listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.zeroturnaround.zip.transform; /*w w w .jav a2s . c om*/ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; public abstract class StreamZipEntryTransformer implements ZipEntryTransformer { /** * Copies and transforms the given input stream into the output stream. */ protected abstract void transform(ZipEntry zipEntry, InputStream in, OutputStream out) throws IOException; public void transform(InputStream in, ZipEntry zipEntry, ZipOutputStream out) throws IOException { ZipEntry entry = new ZipEntry(zipEntry.getName()); entry.setTime(System.currentTimeMillis()); out.putNextEntry(entry); transform(zipEntry, in, out); out.closeEntry(); } }