Package org.apache.tika.parser.pkg
Class ZipContainerDetector
- java.lang.Object
-
- org.apache.tika.parser.pkg.ZipContainerDetector
-
- All Implemented Interfaces:
Serializable,org.apache.tika.detect.Detector
public class ZipContainerDetector extends Object implements org.apache.tika.detect.Detector
A detector that works on Zip documents and other archive and compression formats to figure out exactly what the file is.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ZipContainerDetector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.tika.mime.MediaTypedetect(InputStream input, org.apache.tika.metadata.Metadata metadata)static org.apache.tika.mime.MediaTypedetectOfficeOpenXML(org.apache.poi.openxml4j.opc.OPCPackage pkg)Detects the type of an OfficeOpenXML (OOXML) file from opened PackagevoidsetMarkLimit(int markLimit)If this is less than 0, the file will be spooled to disk, and detection will run on the full file.
-
-
-
Method Detail
-
detect
public org.apache.tika.mime.MediaType detect(InputStream input, org.apache.tika.metadata.Metadata metadata) throws IOException
- Specified by:
detectin interfaceorg.apache.tika.detect.Detector- Throws:
IOException
-
setMarkLimit
public void setMarkLimit(int markLimit)
If this is less than 0, the file will be spooled to disk, and detection will run on the full file. If this is greater than 0, theStreamingZipContainerDetectorwill be called only up to the markLimit.- Parameters:
markLimit- mark limit for streaming detection
-
detectOfficeOpenXML
public static org.apache.tika.mime.MediaType detectOfficeOpenXML(org.apache.poi.openxml4j.opc.OPCPackage pkg)
Detects the type of an OfficeOpenXML (OOXML) file from opened Package
-
-