try {
inFile = File.createTempFile("zip", null);
outFile = File.createTempFile("zip", null);
copy(in, inFile);
transform(zipEntry, inFile, outFile);
FileSource source = new FileSource(zipEntry.getName(), outFile);
ZipEntrySourceZipEntryTransformer.addEntry(source, out);
}
finally {
FileUtils.deleteQuietly(inFile);
FileUtils.deleteQuietly(outFile);