Class ByteArrayZipEntryTransformer
java.lang.Object
org.zeroturnaround.zip.transform.ByteArrayZipEntryTransformer
- All Implemented Interfaces:
ZipEntryTransformer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanOverride to return true if needed.voidtransform(InputStream in, ZipEntry zipEntry, ZipOutputStream out) Transforms the zip entry given as an input stream and ZipEntry metadata.protected abstract byte[]Transforms the given byte array into a new one.
-
Constructor Details
-
ByteArrayZipEntryTransformer
public ByteArrayZipEntryTransformer()
-
-
Method Details
-
transform
Transforms the given byte array into a new one.- Parameters:
zipEntry- entry to transforminput- entry contents- Returns:
- byte[] the transformed contents of the entry
- Throws:
IOException- if anything goes wrong
-
transform
Transforms the zip entry given as an input stream and ZipEntry metadata. The result is written to a ZipOutputStream * @param in input stream of the entry contents- Specified by:
transformin interfaceZipEntryTransformer- Parameters:
in- input stream of the entry contentszipEntry- zip entry metadataout- output stream to write transformed entry- Throws:
IOException- if anything goes wrong
-
preserveTimestamps
protected boolean preserveTimestamps()Override to return true if needed.- Returns:
- true if this transformer should preserve timestamp of the entry it transforms, false otherwise
-