Class FileZipEntryTransformer

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private static void copy​(java.io.InputStream in, java.io.File file)  
      void transform​(java.io.InputStream in, java.util.zip.ZipEntry zipEntry, java.util.zip.ZipOutputStream out)
      Copies the input stream to the file, then transforms the file.
      protected abstract void transform​(java.util.zip.ZipEntry zipEntry, java.io.File in, java.io.File out)
      Copies and transforms the given file into the output file.
      • Methods inherited from class java.lang.Object

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

      • FileZipEntryTransformer

        public FileZipEntryTransformer()
    • Method Detail

      • transform

        protected abstract void transform​(java.util.zip.ZipEntry zipEntry,
                                          java.io.File in,
                                          java.io.File out)
                                   throws java.io.IOException
        Copies and transforms the given file into the output file.
        Parameters:
        zipEntry - zip entry metadata
        in - zip entry contents
        out - file to write transformed contents
        Throws:
        java.io.IOException - if file is not found or writing to it fails
      • transform

        public void transform​(java.io.InputStream in,
                              java.util.zip.ZipEntry zipEntry,
                              java.util.zip.ZipOutputStream out)
                       throws java.io.IOException
        Copies the input stream to the file, then transforms the file. FileSource is added then to the output stream.
        Specified by:
        transform in interface ZipEntryTransformer
        Parameters:
        in - input stream of the entry contents
        zipEntry - zip entry metadata
        out - ignored, because we're working on files
        Throws:
        java.io.IOException - if anything goes wrong
      • copy

        private static void copy​(java.io.InputStream in,
                                 java.io.File file)
                          throws java.io.IOException
        Throws:
        java.io.IOException