Package org.zeroturnaround.zip.transform
Class StringZipEntryTransformer
- java.lang.Object
-
- org.zeroturnaround.zip.transform.StringZipEntryTransformer
-
- All Implemented Interfaces:
ZipEntryTransformer
public abstract class StringZipEntryTransformer extends java.lang.Object implements ZipEntryTransformer
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
encoding
The encoding to use, null means platform default.
-
Constructor Summary
Constructors Constructor Description StringZipEntryTransformer()
StringZipEntryTransformer(java.lang.String encoding)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
transform(java.io.InputStream in, java.util.zip.ZipEntry zipEntry, java.util.zip.ZipOutputStream out)
Transforms the zip entry given as an input stream and ZipEntry metadata.protected abstract java.lang.String
transform(java.util.zip.ZipEntry zipEntry, java.lang.String input)
Transforms the given String into a new one.
-
-
-
Method Detail
-
transform
protected abstract java.lang.String transform(java.util.zip.ZipEntry zipEntry, java.lang.String input) throws java.io.IOException
Transforms the given String into a new one.- Parameters:
zipEntry
- zip entry metadatainput
- zip entry contents- Returns:
- String - transformed entry contents
- Throws:
java.io.IOException
- if transformation cannot be completed succesfully
-
transform
public void transform(java.io.InputStream in, java.util.zip.ZipEntry zipEntry, java.util.zip.ZipOutputStream out) throws java.io.IOException
Description copied from interface:ZipEntryTransformer
Transforms the zip entry given as an input stream and ZipEntry metadata. The result is written to a ZipOutputStream- 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:
java.io.IOException
- if anything goes wrong
-
-