Class StringZipEntryTransformer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String encoding
      The encoding to use, null means platform default.
    • 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.
      • Methods inherited from class java.lang.Object

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

      • encoding

        private final java.lang.String encoding
        The encoding to use, null means platform default.
    • Constructor Detail

      • StringZipEntryTransformer

        public StringZipEntryTransformer()
      • StringZipEntryTransformer

        public StringZipEntryTransformer​(java.lang.String encoding)
    • 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 metadata
        input - 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 interface ZipEntryTransformer
        Parameters:
        in - input stream of the entry contents
        zipEntry - zip entry metadata
        out - output stream to write transformed entry (if necessary)
        Throws:
        java.io.IOException - if anything goes wrong