Class StreamZipEntryTransformer

java.lang.Object
org.zeroturnaround.zip.transform.StreamZipEntryTransformer
All Implemented Interfaces:
ZipEntryTransformer

public abstract class StreamZipEntryTransformer extends Object implements ZipEntryTransformer
  • Constructor Details

    • StreamZipEntryTransformer

      public StreamZipEntryTransformer()
  • Method Details

    • transform

      protected abstract void transform(ZipEntry zipEntry, InputStream in, OutputStream out) throws IOException
      Copies and transforms the given input stream into the output stream.
      Parameters:
      zipEntry - zip entry metadata
      in - zip entry contents
      out - output stream to write the transformed entry
      Throws:
      IOException - if writing transformed entry fails
    • transform

      public void transform(InputStream in, ZipEntry zipEntry, ZipOutputStream out) throws IOException
      Transforms the input stream entry, writes that to output stream, closes entry in the output stream.
      Specified by:
      transform in interface ZipEntryTransformer
      Parameters:
      in - input stream of the entry contents
      zipEntry - zip entry metadata
      out - output stream to write transformed entry (if necessary)
      Throws:
      IOException - if anything goes wrong