Package org.zeroturnaround.zip.transform
Class FileZipEntryTransformer
java.lang.Object
org.zeroturnaround.zip.transform.FileZipEntryTransformer
- All Implemented Interfaces:
ZipEntryTransformer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
copy
(InputStream in, File file) void
transform
(InputStream in, ZipEntry zipEntry, ZipOutputStream out) Copies the input stream to the file, then transforms the file.protected abstract void
Copies 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:
transform
in 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
-