/** * Reads the source ZIP file and executes the given callback for each entry. * <p> * For each entry the corresponding input stream is also passed to the callback. If you want to stop the loop then throw a ZipBreakException. * * This method is charset aware and uses Zips.charset. * * @param zipEntryCallback * callback to be called for each entry. * * @see ZipEntryCallback * */ public void iterate(ZipEntryCallback zipEntryCallback) { ZipEntryOrInfoAdapter zipEntryAdapter = new ZipEntryOrInfoAdapter(zipEntryCallback, null); processAllEntries(zipEntryAdapter); }
public void process(InputStream in, ZipEntry zipEntry) throws IOException { if (entryCallback != null) { entryCallback.process(in, zipEntry); } else { process(zipEntry); } }
zipEntryCallback.process(is, entry);
/** * Scans the source ZIP file and executes the given callback for each entry. * <p> * Only the meta-data without the actual data is read. If you want to stop the loop then throw a ZipBreakException. * * This method is charset aware and uses Zips.charset. * * @param callback * callback to be called for each entry. * * @see ZipInfoCallback * @see #iterate(ZipEntryCallback) */ public void iterate(ZipInfoCallback callback) { ZipEntryOrInfoAdapter zipEntryAdapter = new ZipEntryOrInfoAdapter(null, callback); processAllEntries(zipEntryAdapter); }
zipEntryCallback.process(entrySourceStream, entry);
zipEntryAdapter = new ZipEntryOrInfoAdapter(new CopyingCallback(transformers, out, preserveTimestamps), null); zipEntryAdapter = new ZipEntryOrInfoAdapter(new UnpackingCallback(transformers, destinationFile), null);
public void process(InputStream in, ZipEntry zipEntry) throws IOException { if (entryCallback != null) { entryCallback.process(in, zipEntry); } else { process(zipEntry); } }
/** * Reads the source ZIP file and executes the given callback for each entry. * <p> * For each entry the corresponding input stream is also passed to the callback. If you want to stop the loop then throw a ZipBreakException. * * This method is charset aware and uses Zips.charset. * * @param zipEntryCallback * callback to be called for each entry. * * @see ZipEntryCallback * */ public void iterate(ZipEntryCallback zipEntryCallback) { ZipEntryOrInfoAdapter zipEntryAdapter = new ZipEntryOrInfoAdapter(zipEntryCallback, null); processAllEntries(zipEntryAdapter); }
zipEntryCallback.process(is, entry);
/** * Scans the source ZIP file and executes the given callback for each entry. * <p> * Only the meta-data without the actual data is read. If you want to stop the loop then throw a ZipBreakException. * * This method is charset aware and uses Zips.charset. * * @param callback * callback to be called for each entry. * * @see ZipInfoCallback * @see #iterate(ZipEntryCallback) */ public void iterate(ZipInfoCallback callback) { ZipEntryOrInfoAdapter zipEntryAdapter = new ZipEntryOrInfoAdapter(null, callback); processAllEntries(zipEntryAdapter); }
zipEntryCallback.process(entrySourceStream, entry);
zipEntryAdapter = new ZipEntryOrInfoAdapter(new CopyingCallback(transformers, out, preserveTimestamps), null); zipEntryAdapter = new ZipEntryOrInfoAdapter(new UnpackingCallback(transformers, destinationFile), null);