Class FileZipEntryTransformer
java.lang.Object
org.zeroturnaround.zip.transform.FileZipEntryTransformer
- All Implemented Interfaces:
ZipEntryTransformer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcopy(InputStream in, File file) voidtransform(InputStream in, ZipEntry zipEntry, ZipOutputStream out) Copies the input stream to the file, then transforms the file.protected abstract voidCopies and transforms the given file into the output file.
-
Constructor Details
-
FileZipEntryTransformer
public FileZipEntryTransformer()
-
-
Method Details
-
transform
Copies and transforms the given file into the output file.- Parameters:
zipEntry- zip entry metadatain- zip entry contentsout- file to write transformed contents- Throws:
IOException- if file is not found or writing to it fails
-
transform
Copies the input stream to the file, then transforms the file. FileSource is added then to the output stream.- Specified by:
transformin interfaceZipEntryTransformer- Parameters:
in- input stream of the entry contentszipEntry- zip entry metadataout- ignored, because we're working on files- Throws:
IOException- if anything goes wrong
-
copy
- Throws:
IOException
-