Class ZipUtil.BackslashUnpacker

  • All Implemented Interfaces:
    ZipEntryCallback
    Enclosing class:
    ZipUtil

    public static class ZipUtil.BackslashUnpacker
    extends java.lang.Object
    implements ZipEntryCallback
    Unpacks each ZIP entries. Presumes they are packed with the backslash separator. Some archives can have this problem if they are created with some software that is not following the ZIP specification.
    Since:
    zt-zip 1.9
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void process​(java.io.InputStream in, java.util.zip.ZipEntry zipEntry)
      Invoked for each entry in a ZIP file.
      • Methods inherited from class java.lang.Object

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

      • outputDir

        private final java.io.File outputDir
    • Constructor Detail

      • BackslashUnpacker

        public BackslashUnpacker​(java.io.File outputDir,
                                 NameMapper mapper)
      • BackslashUnpacker

        public BackslashUnpacker​(java.io.File outputDir)
    • Method Detail

      • process

        public void process​(java.io.InputStream in,
                            java.util.zip.ZipEntry zipEntry)
                     throws java.io.IOException
        Description copied from interface: ZipEntryCallback
        Invoked for each entry in a ZIP file.
        Specified by:
        process in interface ZipEntryCallback
        Parameters:
        in - contents of the ZIP entry.
        zipEntry - ZIP entry.
        Throws:
        java.io.IOException - when any processing exception occurs