Class ZipSalvager

java.lang.Object
org.apache.tika.parser.utils.ZipSalvager

@Deprecated(since="2026-04-30") public class ZipSalvager extends Object
Deprecated.
  • Constructor Details

    • ZipSalvager

      public ZipSalvager()
      Deprecated.
  • Method Details

    • salvageCopy

      public static void salvageCopy(InputStream brokenZip, File salvagedZip, boolean allowStoredEntries) throws IOException
      Deprecated.
      This streams the broken zip and rebuilds a new zip that is at least a valid zip file. The contents of the final stream may be truncated, but the result should be a valid zip file.

      This does nothing fancy to fix the underlying broken zip.

      Parameters:
      brokenZip -
      salvagedZip -
      Throws:
      IOException
    • salvageCopy

      public static void salvageCopy(File brokenZip, File salvagedZip) throws IOException
      Deprecated.
      Throws:
      IOException