Class ByteArrayZipEntryTransformer

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean preserveTimestamps()
      Override to return true if needed.
      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 byte[] transform​(java.util.zip.ZipEntry zipEntry, byte[] input)
      Transforms the given byte array into a new one.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteArrayZipEntryTransformer

        public ByteArrayZipEntryTransformer()
    • Method Detail

      • transform

        protected abstract byte[] transform​(java.util.zip.ZipEntry zipEntry,
                                            byte[] input)
                                     throws java.io.IOException
        Transforms the given byte array into a new one.
        Parameters:
        zipEntry - entry to transform
        input - entry contents
        Returns:
        byte[] the transformed contents of the entry
        Throws:
        java.io.IOException - if anything goes wrong
      • transform

        public void transform​(java.io.InputStream in,
                              java.util.zip.ZipEntry zipEntry,
                              java.util.zip.ZipOutputStream out)
                       throws java.io.IOException
        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:
        transform in interface ZipEntryTransformer
        Parameters:
        zipEntry - zip entry metadata
        out - output stream to write transformed entry
        in - input stream of the entry contents
        Throws:
        java.io.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