Package org.zeroturnaround.zip.transform
Class StreamZipEntryTransformer
java.lang.Object
org.zeroturnaround.zip.transform.StreamZipEntryTransformer
- All Implemented Interfaces:
ZipEntryTransformer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
transform
(InputStream in, ZipEntry zipEntry, ZipOutputStream out) Transforms the input stream entry, writes that to output stream, closes entry in the output stream.protected abstract void
transform
(ZipEntry zipEntry, InputStream in, OutputStream out) Copies and transforms the given input stream into the output stream.
-
Constructor Details
-
StreamZipEntryTransformer
public StreamZipEntryTransformer()
-
-
Method Details
-
transform
protected abstract void transform(ZipEntry zipEntry, InputStream in, OutputStream out) throws IOException Copies and transforms the given input stream into the output stream.- Parameters:
zipEntry
- zip entry metadatain
- zip entry contentsout
- output stream to write the transformed entry- Throws:
IOException
- if writing transformed entry fails
-
transform
Transforms the input stream entry, writes that to output stream, closes entry in the output stream.- Specified by:
transform
in interfaceZipEntryTransformer
- Parameters:
in
- input stream of the entry contentszipEntry
- zip entry metadataout
- output stream to write transformed entry (if necessary)- Throws:
IOException
- if anything goes wrong
-