Package org.apache.tika.parser.utils
Class ZipSalvager
- java.lang.Object
-
- org.apache.tika.parser.utils.ZipSalvager
-
public class ZipSalvager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ZipSalvager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
salvageCopy(java.io.File brokenZip, java.io.File salvagedZip)
static void
salvageCopy(java.io.InputStream brokenZip, java.io.File salvagedZip)
This streams the broken zip and rebuilds a new zip that is at least a valid zip file.
-
-
-
Method Detail
-
salvageCopy
public static void salvageCopy(java.io.InputStream brokenZip, java.io.File salvagedZip)
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
-
-
salvageCopy
public static void salvageCopy(java.io.File brokenZip, java.io.File salvagedZip) throws java.io.IOException
- Throws:
java.io.IOException
-
-